nerdexam
Linux_Foundation

LFCA · Question #52

Which is a common best practice to automatically reduce disk usage associated with the storage of log files?

The correct answer is A. Use the loqrotate utility to periodically rotate the loq files. The question seeks an automatic and common best practice for managing log file disk usage on Linux systems.

Submitted by skyler.x· May 4, 2026System Administration

Question

Which is a common best practice to automatically reduce disk usage associated with the storage of log files?

Options

  • AUse the loqrotate utility to periodically rotate the loq files.
  • BCreate a cron job that deletes all log files in the folder every day.
  • CDelete the Vvar/log" directory so the log files are prevented from being created.
  • DManually empty the log files every day of the week.

How the community answered

(23 responses)
  • A
    87% (20)
  • C
    9% (2)
  • D
    4% (1)

Why each option

The question seeks an automatic and common best practice for managing log file disk usage on Linux systems.

AUse the loqrotate utility to periodically rotate the loq files.Correct

The `logrotate` utility is specifically designed for automated log management on Linux systems, allowing for periodic rotation, compression, and deletion of log files. This process conserves disk space while retaining a history of logs for auditing and troubleshooting, adhering to best practices for log maintenance.

BCreate a cron job that deletes all log files in the folder every day.

Deleting all log files daily via cron would destroy all historical log data, making troubleshooting and auditing impossible, which is not a best practice.

CDelete the Vvar/log" directory so the log files are prevented from being created.

Deleting the `/var/log` directory would prevent most system and application logging, breaking system functionality and making it impossible to diagnose issues.

DManually empty the log files every day of the week.

Manually emptying log files is not an automatic solution and is impractical and error-prone for ongoing system maintenance.

Concept tested: Linux log file management (logrotate)

Source: https://man7.org/linux/man-pages/man8/logrotate.8.html

Topics

#logrotate#Log Management#Disk Usage#Automation

Community Discussion

No community discussion yet for this question.

Full LFCA Practice