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

John Macdonald john-Z7w/En0MP3xWk0Htik3J/w at public.gmane.org
Wed Jan 31 01:15:54 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?

Using:

    find . -print | xargs rm

would do it in one shot (as long as you really want to
delete everything in the current directory and there are
no sub-directories - there are other variants to deal with
those cases).

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