XK0-006 System Management Practice Question
Which directory in the Filesystem Hierarchy Standard (FHS) contains variable data such as logs and spool files?
⚠ Common exam trap
The trap is confusing /var with /tmp or /etc. Candidates might think logs are in /tmp because they are temporary, but /tmp is for short-lived files, while /var is for persistent variable data. Also, /etc is for configuration, not logs.
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
✓
/var
/var is the correct directory because the Filesystem Hierarchy Standard (FHS) designates /var for variable data files that are expected to change in size and content as the system runs, such as logs, spool files, and temporary files. This includes /var/log for system logs and /var/spool for print and mail queues. It is distinct from static data like binaries or configuration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/opt
Why it's wrong here
/opt holds add-on application software packages, which are static installed content rather than variable runtime data. It is tempting because third-party applications write there, but /var is the FHS directory reserved for variable data including logs, spool files and caches.
- ✗
/etc
Why it's wrong here
/etc holds static host-specific configuration files, which are not expected to change during normal operation, whereas the question asks for variable data. It is tempting because administrators edit it constantly, but /var is the FHS location for variable data such as logs, spool files and caches.
- ✓
/var
Why this is correct
/var holds variable data that changes during normal operation, including system logs under /var/log and print spool files under /var/spool. This directly satisfies the stem's requirement for the FHS directory designated for variable data, distinguishing it from static directories such as /usr and /etc.
- ✗
/tmp
Why it's wrong here
/tmp holds temporary files that applications may discard between reboots, not persistent variable data such as logs and spool files. It is tempting because it is writable and frequently used at runtime, but /var is the FHS directory designated for variable data including logs, spool and caches.
Go deeper
Related to this question
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
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.