On Wed, Dec 05, 2012 at 02:19:09PM -0600, Tilghman Lesher wrote:
> 
> Just curious as to why you wouldn't just use:
> find /some/directory -mtime 30 -exec rm -f {} +

Due to rounding issues that won't catch everything; I either use -mtime
+31 or -daystart -mtime +30.  "man find" and see write-up for -atime for
more information on rounding.

And boo on gratuitous forks() :)  GNU find can short-circuit via -delete
or just dump out to xargs rm :)





                                                        John
-- 
When you've driven race cars, and when you've jumped out of airplanes, cars
are on fire, when you've been upside down at two hundred miles per hour
waiting for your head to hit the ground, when you've been in Africa with a
wounded Cape buffalo six feet in front of you, chargin' ya, I'll let
someone else decide what the most dangerous thing I've ever done is.

-- Carroll Shelby (11 January 1912 - 10 May 2012)
   American automotive designer, racing driver, and entrepreneur

Attachment: pgpXhOIIvg3dC.pgp
Description: PGP signature

Reply via email to