Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Feb 2012 14:15:16 -0800
From:      Ingo Hofmann <ingo.hofmann@dont-panic.org>
To:        Rares Aioanei <bsdlisten@gmail.com>
Cc:        =?utf-8?B?0JrQvtC90YzQutC+0LIg0JXQstCz0LXQvdC40Lk=?= <kes-kes@yandex.ru>, freebsd-questions@freebsd.org
Subject:   Re: 'rm' Can not delete files
Message-ID:  <3DFDF5C0-2D39-4A88-B3B5-7D236A7FC4DA@dont-panic.org>
In-Reply-To: <4F31A15C.3050506@gmail.com>
References:  <1237723287.20120207235924@yandex.ru> <4F31A15C.3050506@gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
What helps me sometimes is wrapping it up:

for i in *; do rm $i; done

Best,
Ingo

P.S.:
Helps also with whitespaces in the filename where 'rm *' fails too.

On 07.02.2012, at 14:10 , Rares Aioanei wrote:

> On 02/07/2012 11:59 PM, =CA=EE=ED=FC=EA=EE=E2 =C5=E2=E3=E5=ED=E8=E9 =
wrote:
>> # rm *
>> /bin/rm: Argument list too long.
>>=20
>>=20
>> in this directory about 25000 files,
>> but actually there is only one argument to rm it is '*' sign.
>>=20
>> Why rm get list of all files in directore instead of deleting one by =
one?
>>=20
>> _______________________________________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to =
"freebsd-questions-unsubscribe@freebsd.org"
>>=20
> AFAIR, the shell expands * to every match , so from this point of view =
it is equivalent to the 25000 files. Try 'rm -f [a-d]*' , then [e-h]* or =
similar until you get them all.
>=20
> Best,
>=20
> --=20
> Rares Aioanei
>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to =
"freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?3DFDF5C0-2D39-4A88-B3B5-7D236A7FC4DA>