Hands-on task
This task is step 20 of the course “find and xargs: search and bulk operations”
find: database dumps older than a week
Nightly dumps *.sql.gz have piled up in /var/backups/db. Delete the dumps modified more than 7 days ago; keep fresh dumps and other files in the directory (for example, restore.lock), even if they are old.
Reference:find
What you'll practise:
- find
- -mtime
- -name
- backup rotation
- -delete