::::: : the wood : davidrobins.net

Delete files older than n days

Technical ·Monday May 17, 2010 @ 00:31 EDT (link)

Used this to clean out /usr/portage/distfiles (which also contains source control packages—"-9999" versions):
find . -maxdepth 1 -mtime +5 -type f -print0 | xargs -0 rm
Keeping this around as a handy reference. (-maxdepth prevents recursing into source control directions—just svn-src now—and -mtime +5 tags anything 5 days old and older (the + means "and up".)

Books finished: Black Rednecks and White Liberals.