XK0-006 Troubleshooting Practice Question
A Linux server's root filesystem is filling rapidly. The administrator suspects a process is writing to a deleted file that still holds space. They want to identify which running process has an open file descriptor to a deleted file. Which command should they use?
⚠ Common exam trap
The trap here is assuming that deleting a file immediately frees disk space, when an open file descriptor keeps the inode and blocks allocated until the process releases them.
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
✓
lsof +L1
When a process holds a deleted file open, the inode and its blocks remain allocated until the process closes or exits, so the space does not return to the filesystem. The lsof command with +L1 filters open files whose link count is below one, precisely matching deleted-but-open files. It outputs the responsible PID and command, enabling the administrator to restart the process and reclaim the space.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
vmstat 1 5
Why it's wrong here
vmstat reports virtual memory, CPU, and I/O statistics over intervals. It can show that disk writes are occurring but cannot attribute them to a specific process or reveal deleted-file descriptors. The administrator needs process-level file handle details, not system-wide performance counters. While useful for observing overall I/O pressure, vmstat does not identify which process holds a deleted file open.
- ✗
ps aux --sort=-%mem
Why it's wrong here
This command lists processes sorted by memory usage, highlighting the largest memory consumers. It provides no information about open file descriptors or deleted files. A process holding a deleted file open may have modest memory usage, so it would not necessarily appear near the top. Sorting by memory cannot identify the disk-space leak described, making this command unsuitable for the scenario.
- ✓
lsof +L1
Why this is correct
The lsof +L1 option lists open files with a link count less than one, which identifies deleted files still held open by a process. This directly reveals processes writing to unlinked files that continue to consume disk space. The output shows the PID, command, and file path with a (deleted) marker, giving the administrator exactly the information needed to restart or kill the offending process and reclaim space.
- ✗
df -i /
Why it's wrong here
The -i option to df reports inode usage rather than block usage. It can reveal inode exhaustion, a different problem where many small files consume all inodes. The scenario describes block space being consumed by a deleted file, which inode counts do not show. Checking inode usage is a valid diagnostic step but does not identify the process holding a deleted file open.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
Process
In IT service management, a process is a structured set of activities designed to accomplish a specific objective, such as managing incidents or changes, by transforming inputs into defined outputs.
Key term
inode
An inode is a data structure in a Unix-like file system that stores metadata about a file, such as its size, permissions, and location on disk, but not its name.
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.