This script removes every *.wav file older then one minute in the directory it is executed. This script is very useful and can be used with the cron daemon for regular file removal.
Also we can adjust this for days rather than minutes by changing ‘-mmin +1’ to ‘-mtime +10’. This would delete .wav files in the working directory that were older than 10 days.
One more example, the script below will erase all MP3 files older than 10 days form Matt’s music directory. I hope this is of use to someone out there.