nerdexam
Linux_Foundation

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.

Submitted by chiamaka_o· Apr 18, 2026Operation of Running Systems

Question

Which of the following commands is used to rotate, compress, and mail system logs?

Options

  • Arotatelog
  • Bstriplog
  • Csyslogd --rotate
  • Dlogrotate
  • Elogger

How the community answered

(49 responses)
  • A
    6% (3)
  • B
    2% (1)
  • C
    2% (1)
  • D
    90% (44)

Why each option

The `logrotate` utility is specifically designed to rotate, compress, and mail system logs to prevent disk space exhaustion.

Arotatelog

`rotatelog` is typically part of Apache and specifically rotates Apache access and error logs, not a general system log rotator.

Bstriplog

`striplog` is not a standard command for log rotation, compression, or mailing.

Csyslogd --rotate

`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.

DlogrotateCorrect

`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.

Elogger

`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

#log rotation#log management#logrotate command#system maintenance

Community Discussion

No community discussion yet for this question.

Full LFCS Practice