December 2018
Beginner
320 pages
8h 57m
English
Log rotation prevents the filling up of the /var/log directory. Old log files are renamed with filename-datestamp on rotation. The datestamp indicates the date on which it was rotated (archived) as shown in the following table:
|
Existing log |
Archived log |
|
/var/log/messages |
/var/log/messages-20180530 (rotated on May 30, 2018) |
Logrotate is the utility that takes care of rotating the log files periodically. A cron job is run nightly with the script named /etc/cron.daily/logrotate for log rotation. The rotation of log files is carried out as per the configuration of log rotation program stored in the following two locations:
Most log files ...
Read now
Unlock full access