LFCS practice question 10 of 35
Which of the following commands is used to rotate, compress, and mail system logs?
Full set: 260 questionsThe logrotate utility is the standard Linux tool designed to manage log files. Its primary functions include automatic rotation, compression, removal, and mailing of log files. It can be configured to handle logs daily, weekly, monthly, or when they grow too large. The configuration in /etc/logrotate.conf and /etc/logrotate.d/ allows for granular control over these actions, making it an essential tool for system administration to prevent log files from consuming excessive disk space.
A. rotatelog is a simple log rotation tool typically used with the Apache HTTP Server, not a general-purpose system utility.
B. striplog is not a standard command for log rotation in common Linux distributions.
C. syslogd is a daemon that collects log messages; it does not have a built-in --rotate option for managing the log files themselves.
E. The logger command is used to add entries to the system log, not to manage or rotate the log files.
- Red Hat Enterprise Linux 8 Documentation, Section 25.1. "Getting started with logrotate". This section details the purpose and usage of the logrotate utility.
- logrotate(8) Linux manual page. It describes logrotate as a tool designed to "ease administration of systems that generate large numbers of log files."
- Ubuntu Server Guide, "Log Rotation". This guide explains that logrotate is installed by default to handle the rotation of all system log files.
Keep practicing
Take the free LFCS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LFCS practice questions
- Question 1Which of the following commands should be added to /etc/bash_profile in order to change t…
- Question 2Which of the following commands reboots the system when using SysV init? (Choose TWO corr…
- Question 3Which of the following tasks can be accomplished using the command date? (Choose TWO corr…
- Question 4Which of the following environment variables overrides or extends the list of directories…
- Question 5Which of the following are syslog facilities? (Choose TWO correct answers.)
- Question 6Which of the following programs uses the hosts.allow file to perform its main task of che…
