Deleting Files 30 days or older

In order to keep my backup server from running out of harddrive space, I needed to remove anything that was 30 days or older. (This was for my Zimbra backups). In order to do this, I just had to add the following line to my crontab:

find yourdirectory -maxdepth 1 -mtime +30 -exec rm -rf {} \;

It is as simple as that!

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner