Re: [Nolug] Getting rid of old files

From: Ron Johnson <ron.l.johnson_at_cox.net>
Date: Tue, 27 Jan 2004 17:10:50 -0600
Message-Id: <1075245050.7907.2.camel@haggis.homelan>

On Tue, 2004-01-27 at 11:43, Mark A. Hershberger wrote:
> "Dustin Puryear" <dpuryear@usa.net> writes:
>
> > 'man find'. It was probably something along the lines of:
> >
> > $ find . -mtime +7 -exec rm {} \;
>
> Faster:
>
> $ find . -mtime +7 -print0 | xargs -0 rm
>
> Piping find to xargs means that you can load up a single rm with
> multiple files instead of forking off an rm for every file.

Doesn't this suffer the limitation that the command buffer would
get filled, if you were going to delete *lots* of files?

Of course, if you are *not* going to delete 20,000 at once....

-- 
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA
"And I'm hiding in Honduras, I'm a desperate man. Send lawyers,
guns and money!"
___________________
Nolug mailing list
nolug@nolug.org
Received on 01/27/04

This archive was generated by hypermail 2.2.0 : 12/19/08 EST