Service Administration

Log Rotation Gone Wrong

250 pts
0 solves
medium hands-on
The /var/log/myapp.log file has grown to 50MB and is consuming precious disk space. A logrotate configuration was set up at /etc/logrotate.d/myapp but it has a syntax error and doesn't work. Fix the logrotate configuration so that it passes validation, then rotate the log to bring it under 10MB. You can test your config with: logrotate -d /etc/logrotate.d/myapp You can force a rotation with: logrotate -f /etc/logrotate.d/myapp

Ready to solve this?

Create a free account to launch containers, submit answers, and track your progress.