Have you ever needed to clean out some old files out of a folder? This is especially useful when you are trying to keep a log directory from getting too bloated with files, and Linux makes it really easy to clear out the junk. We'll just use the find command to search for all the files older than a certain date, and then use the –exec command to delete them. You could use the –delete command instead, but you'll end up with a maximum arguments when there are too many files. Find Command Syntax

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

Note that there are spaces between rm, {}, and ; Explanation for Command

This pretty much works on any 'nix distribution.