mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A Linux server is running low on disk space in…
A Linux server is running low on disk space in the /var partition. The administrator runs 'du -sh /var/log/*' and finds that /var/log/syslog is 10 GB. Which of the following is the BEST long-term solution to prevent recurrence?
⚠ Common exam trap
It's easy for candidates to confuse 'increasing rotation frequency' with 'reducing log size,' but increasing the interval (e.g., to monthly) actually worsens the problem, while daily rotation with compression is the correct long-term solution.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure logrotate to rotate and compress the syslog file daily.
Logrotate is the standard Linux utility for managing log file growth. By configuring logrotate to rotate and compress /var/log/syslog daily, the system automatically archives old logs and prevents a single file from consuming excessive disk space, addressing the root cause without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Manually truncate the syslog file with '> /var/log/syslog'.
Why it's wrong here
This only provides temporary relief and does not prevent future growth.
- ✗
Delete the syslog file and restart the syslog service.
Why it's wrong here
Deleting the file removes valuable logs and is not a long-term solution.
- ✓
Configure logrotate to rotate and compress the syslog file daily.
Why this is correct
logrotate automates rotation, keeping log sizes manageable.
- ✗
Increase the log rotation frequency in /etc/logrotate.conf to monthly.
Why it's wrong here
Monthly rotation would allow the log to grow larger before rotation.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
Utility
Utility, in IT service management, is the measure of a service's functionality that ensures it is fit for purpose by meeting the specific needs of the customer.
Key term
Syslog
Syslog is a standard protocol used to send and store log messages from network devices and servers to a central logging server for monitoring and troubleshooting.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.