CompTIA
XK0-005 · Question #110100
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?
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
How the community answered
(54 responses)- A87% (47)
- B7% (4)
- C2% (1)
- D4% (2)
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#systemd#Log Management#Disk Space Management
Community Discussion
No community discussion yet for this question.