billions of files, ext3, reiser, and ls -aly

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Jan 31 14:00:19 UTC 2007


On Tue, Jan 30, 2007 at 07:31:46PM -0500, Chris F.A. Johnson wrote:
>        There are various ways to do it. If the files are sensibly named
>        (no spaces or other pathological characters), it it relatively
>        easy, e.g.:
> 
>    xargs rm < <(ls .)
> 
>    printf "%s\n" * | xargs rm  ## printf is a bash builtin

If they have spaces you can still use find:
find . -print0 | xargs -0 rm -f

That uses NULL seperation rather than space seperation.
--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list