This can be useful when making a rolling backup script
find /directory -type f -mtime +12 | xargs rm
/directory: your directory name that the files are under (rename appropriately)
-type f: only delete files (not subdirectories)
+12: older than 12 days old
Thanks!
ReplyDeletethanks buddy this really helped me out. . if you put -type d it'll list the directories.. . awesome!!!
ReplyDeleteAndy D.
http://www.FranklinFaces.com