[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Delete 4 million files

Tapani Tarvainen schrieb:
>> kj wrote:
>>> Now, I've been running the usual find . -type f -exec rm {} \;
>>> but this is going at about 700,000 per day.  Would simply doing an rm  
>>> -rf on the Maildir be quicker?  Or is there a better way?
> While rm -rf would certainly be quicker and is obviously preferred
> when you want to remove everything in the directory, the find version
> could be speeded significantly by using xargs, i.e.,
> find . -type f -print0 | xargs -0 rm
> This is especially  useful if you want to remove files selecticely
> instead of everything at once.

This exact solution has been proposed just one week ago in this same thread by
Rob Starling

Reply to: