How to delete all files before a certain date in Linux
If you have a list of files, but you only want to delete files older the a certain date, for example, a maildir folder with 5 years worth of email, and you want to delete everything older then 2 years, then run the following command.
find . -type f -mtime +XXX -maxdepth 1 -exec rm {} \;
The syntax of this is as follows.
[...] – signifies the current folder. You can change this to something like /home/someuser/mail/somedomain/someemail/cur or whatever path you nee