LFCS · Question #36
Which of the following commands is used to rotate, compress, and mail system logs?
The correct answer is D. logrotate. The logrotate utility is specifically designed to rotate, compress, and mail system logs to prevent disk space exhaustion.
Question
Options
- Arotatelog
- Bstriplog
- Csyslogd --rotate
- Dlogrotate
- Elogger
How the community answered
(49 responses)- A6% (3)
- B2% (1)
- C2% (1)
- D90% (44)
Why each option
The `logrotate` utility is specifically designed to rotate, compress, and mail system logs to prevent disk space exhaustion.
`rotatelog` is typically part of Apache and specifically rotates Apache access and error logs, not a general system log rotator.
`striplog` is not a standard command for log rotation, compression, or mailing.
`syslogd` is the system logging daemon; it doesn't have a `--rotate` option for managing log file rotation, which is handled by a separate utility.
`logrotate` is the standard Linux utility that automates the rotation, compression, and removal of log files, with options to mail logs, based on defined configuration policies.
`logger` is a command used to send messages to the system log, not to rotate or manage existing log files.
Concept tested: Log file rotation and management
Source: https://manpages.debian.org/testing/logrotate/logrotate.8.en.html
Topics
Community Discussion
No community discussion yet for this question.