Delete Old Files (bash)

Posted on May 7th, 2007 in Coding, Work by abdallah

find /path/to/dir -mtime +15 -delete

It’s a quick and easy solution in Linux. The one liner above would delete all the files in /path/to/dir that are older than 15 days!

Unix is user-friendly. It’s just very selective about who its friends are

Post a comment

You must be logged in to post a comment.