Re: [Nolug] Getting rid of old files

From: Mark A. Hershberger <mah_at_everybody.org>
Date: Tue, 27 Jan 2004 11:43:33 -0600
Message-ID: <87r7xlcmnu.fsf@weblog.localhost>

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

Mark.

-- 
Peace is only better than war if peace isn't hell, too.
    -- Walker Percy, "The Second Coming"
___________________
Nolug mailing list
nolug@nolug.org
Received on 01/27/04

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