Tags

,

I recently needed to clear out a load of automysql backup files that hadn’t been rotated, and had to dig out this handy one liner:

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

It’ll delete everything older than 90 days that matches the pattern /path/to/files*. Remember to use it with caution and double check the files this will affect.

Advertisements