PROBLEM: I created some temporary files in my web code on Linux and I want to delete them before they pile up and cover the the disk space in my virtual server.

SOLUTION: Thanks to this site, I found a way.

Command Syntax

find /path/to/files* -mtime +5 -exec rm {} \;

/path/to/files* = where my files are
-mtime +5 = 5 days old files
-exec rm {} \; = do remove them.

Post a comment