skip to Main Content

Find and delete files older than 1 week (example)

find /home/users/backup_MyDB -type f -mtime +7 -exec rm {} +

Although generally it is wise to see what you are deleting before you delete (at least when testing you script) for this just do:

find /home/users/backup_MyDB -type f -mtime +7
This Post Has 0 Comments

Leave a Reply

Back To Top