[K12OSN] OT: Scripting Question
Nils Breunese
nils at breun.nl
Thu Nov 30 16:42:19 UTC 2006
Dan Young wrote:
>>> find /FOLDERNAME -type f -mtime +30 -exec rm -f {} ';'
>>
>> Fun trivia: xargs is faster than -exec'ing on every file. It will
>> delete
>> the files together with one invocation of "rm" (or in optimally sized
>> chunks if you're deleting _lots_ of files):
>>
>> find /FOLDERNAME -type -f -mtime +30 -print0 | xargs -0 rm -f
>
> Oops:
>
> find /FOLDERNAME -type f -mtime +30 -print0 | xargs -0 rm -f
I don't see the difference. Is it me?
Nils.
More information about the K12OSN
mailing list