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

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Jan 31 13:59:25 UTC 2007


On Tue, Jan 30, 2007 at 06:50:58PM -0500, John Moniz wrote:
> I just ran into a similar problem trying to delete a bunch of unwanted 
> files (cache for various programs mainly). In one case, there was a huge 
> quantity of files in the directory and a 'rm -f ./*' gave me an error of 
> too many arguments. I had to do it in chunks such as 'rm -f ./*.png' 
> etc, grouping as many files together as possible. Should I have done 
> this with a different command?

Something like:
find . -maxdepth 1 -print0 |xargs -9 rm -f

Or you could have done, cd ..; rm -rf dirname (assuming you didn't want
to keep the dir).

--
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