Find and matching files
Lets day for some reason you needed to find files that were more than 30 minutes old and delete those files. You can use a very simple command for this that you can later add to an Apple script, shell script or even automate it using Launchd.
This will find and remove any files in the folder path specified in quotes that is older than 30 minutes:
find "folder path" -type f -mmin +30 -exec rm {} \;
You can also modify this and search for things that are older than 7 days:
find "folder path" -type f -mtime +7 -exec rm {} \;