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 8 Question 25 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 25
Topic #: 8
[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:

Glendora
5 months ago
You're right, there could be important files in the journal. Maybe rotating them with journalctl would be safer.
upvoted 0 times
...
Yuette
5 months ago
But won't using rm -rf be risky and could potentially delete necessary files?
upvoted 0 times
...
Diane
5 months ago
I think B) systemctl stop systemd-journald and then starting it again could also work.
upvoted 0 times
...
Glendora
5 months ago
I disagree, I believe option C) rm -rf /var/log/journal is the best choice to free up disk space.
upvoted 0 times
...
Yuette
6 months ago
I think the best command to use is A) journalctl --rotate to rotate the journal files.
upvoted 0 times
...
Lawanda
6 months ago
I think option D) pkill -HUP systemd-journald seems like a good solution, as it restarts the journal service.
upvoted 0 times
...
Micheal
7 months ago
Using rm -rf can be risky as it deletes files forcefully, it's better to rotate the journal entries instead.
upvoted 0 times
...
Elin
7 months ago
But what about option C) rm -rf /var/log/journal? Wouldn't that quickly free up space as well?
upvoted 0 times
...
Roslyn
7 months ago
I agree, rotating the journal seems like a safe and efficient way to clear up space.
upvoted 0 times
...
Micheal
7 months ago
I think the best command to free up disk space is A) journalctl --rotate.
upvoted 0 times
...
Alva
8 months ago
Option C looks more promising. Removing the journal directory and restarting the service could potentially clear out all the journal entries and free up space.
upvoted 0 times
...
Tracey
8 months ago
I agree, Option A seems a bit unclear. Option B just stops and starts the journald service, which might not actually free up any space.
upvoted 0 times
...
Sunny
8 months ago
Well, let's take a look at the options. Option A seems to involve some commands I'm not familiar with, and I'm not sure if rotating and vacuuming the journal is the best approach.
upvoted 0 times
Izetta
8 months ago
Option D includes sending a HUP signal to systemd-journald.
upvoted 0 times
...
Vicki
8 months ago
Option C is about deleting the journal entries in /var/log/journal.
upvoted 0 times
...
Fidelia
8 months ago
Option B suggests stopping and then starting systemd-journald.
upvoted 0 times
...
Norah
8 months ago
Option A involves rotating and vacuuming the journal entries.
upvoted 0 times
...
...
Matthew
8 months ago
Hmm, this journald question seems tricky. I'm not sure which command would be the best to free up disk space occupied by the journal entries.
upvoted 0 times
...

Save Cancel