Log Rotation Setup

Configure logrotate for an 18 GB app log that has never been rotated.

A intermediate Linux challenge worth 10 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.

The Challenge

/var/log/app/api.log has grown to 18 GB. The disk is at 89%. The application keeps the file handle open — naive rotation breaks the log stream.

Your tasks:

missingok, notifempty, and a postrotate block that sends SIGHUP to the app process