Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA Exam XK0-005 Topic 3 Question 27 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 27
Topic #: 3
[All XK0-005 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: B

systemctl stop systemd-journald systemctl start systemd-journald is the best approach among the given options. Stopping and starting the systemd-journald service can help in managing the disk space used by journal logs without manually deleting log files or using more aggressive cleanup methods. This method ensures that log management is handled gracefully by the system's own services.


Contribute your Thoughts:

Brett
6 months ago
I see your point, but I still think removing the journal files with option C) is a safer method to free up disk space.
upvoted 0 times
...
Mickie
6 months ago
pkill -HUP sends a signal to systemd-journald to reread its configuration file and reopen log files. It's efficient and effective.
upvoted 0 times
...
Elza
7 months ago
Interesting, can you explain why you think option D) is the best choice?
upvoted 0 times
...
Mickie
7 months ago
I have used option D) pkill -HUP systemd-journald before and it worked well for me.
upvoted 0 times
...
Brett
7 months ago
I disagree, I believe option C) rm -rf /var/log/journal is the right choice.
upvoted 0 times
...
Elza
7 months ago
I think the best command is A) journalctl --rotate.
upvoted 0 times
...
Gerald
8 months ago
No, just using journalctl --rotate should be sufficient.
upvoted 0 times
...
Mindy
8 months ago
Should we also use journalctl --vacuum-time=ls?
upvoted 0 times
...
Skye
8 months ago
Yes, journalctl --rotate should help free up the disk space.
upvoted 0 times
...
Gerald
8 months ago
I think we should use the journalctl command to rotate the logs.
upvoted 0 times
Esteban
8 months ago
C) rm -rf /var/log/journal
upvoted 0 times
...
Chaya
8 months ago
B) systemctl stop systemd-journald
upvoted 0 times
...
Lamar
8 months ago
A) journalctl --rotate
upvoted 0 times
...
...
Mindy
8 months ago
The journald entries have filled up the /var volume. What should we do?
upvoted 0 times
...

Save Cancel