The above find command is all fine and dandy but you don't wanna type this in all the time...set up this command as a cron job. cron is the daemon which handles tasks on a regular basis, such as backups and time updates and deleting
.Trash folders
for this command you wanna do something like this:
which will bring up the crontab editor (for the current user, so if you want this system wide then be root when you do this)
once inside the editor you want the command format of
minute hour dayOfmonth month dayOfweek command
use a '*' for times you don't care about (such as what day of week)
example
Code:
42 4 1 * * find ~/.Trash -mtime +30 -exec rm -Rf {} \;
will run the command at 4:42am on the first of each month
once your command is setup in crontab then save and exit
and you are set