nerdexam
CompTIACompTIA

XK0-005 · Question #650

XK0-005 Question #650: Real Exam Question with Answer & Explanation

The correct answer is A: journalctl --rotate. To safely reduce the size of journald logs, journalctl --rotate forces log rotation, and journalctl -- vacuum-time=ls removes entries older than the specified time. This approach efficiently manages log files without directly deleting files, which could risk corruption.

System Management

Question

The journald entries have filled a Linux machine's /var volume. Which of the following is the best command for a systems administrator to use to free up the disk space occupied by these entries?

Options

  • Ajournalctl --rotate
  • Bsystemctl stop systemd-journald
  • Crm -rf /var/log/journal
  • Dpkill -HUP systemd-journald

Explanation

To safely reduce the size of journald logs, journalctl --rotate forces log rotation, and journalctl -- vacuum-time=ls removes entries older than the specified time. This approach efficiently manages log files without directly deleting files, which could risk corruption.

Topics

#Journald#Log Management#Disk Space#journalctl

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions