Hands-on task
This task is step 6 of the course “Running a server”
Archive old logs
Logs have piled up in /var/log/app. Collect all .log files older than 7 days into the archive /root/old-logs.tar.gz and delete the originals. Don't touch fresh logs.
What you'll practise:
- find
- -mtime
- tar
- gzip
- log rotation