102-500 · Question #6
Which of the following commands is used to rotate, compress, and mail system logs?
The correct answer is A. logrotate. logrotate is the correct answer because it is the standard Linux utility specifically designed to automate rotation, compression, removal, and mailing of log files, configured via /etc/logrotate.conf and /etc/logrotate.d/. striplog is not a standard system utility - it exists…
Question
Options
- Alogrotate
- Bstriplog
- Csyslogd --rotate
- Drotatelog
- Elogger
How the community answered
(30 responses)- A80% (24)
- B7% (2)
- C3% (1)
- E10% (3)
Explanation
logrotate is the correct answer because it is the standard Linux utility specifically designed to automate rotation, compression, removal, and mailing of log files, configured via /etc/logrotate.conf and /etc/logrotate.d/. striplog is not a standard system utility - it exists in some version control contexts but has nothing to do with log management. syslogd --rotate is fabricated; syslogd (or its modern replacement rsyslogd) handles log collection and routing, not rotation, and has no --rotate flag. rotatelog is an Apache utility for piping log output, not a general system log rotation tool. logger is a real command but only sends messages to the system log - it does not rotate or manage logs.
Memory tip: Think of logrotate as doing exactly what its name says - it rotates logs - and it's the one tool that does all three things in the question (rotate, compress, mail). If you see those three verbs together on an exam, logrotate is the answer.
Topics
Community Discussion
No community discussion yet for this question.