easyMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A system administrator needs to find out which…
A system administrator needs to find out which process is using a particular file. Which command should they use?
⚠ Common exam trap
A common mix-up: candidates confuse `fuser` with `lsof` because both can identify processes using a file, but `lsof` provides more comprehensive output and is the standard tool for detailed process-to-file mapping in the XK0-005 exam.
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 /path/to/file
The `lsof` command (list open files) is the correct tool because it displays information about files opened by processes, including the specific file path. When given a file path, `lsof` lists the PID and process name that currently have that file open, directly answering the administrator's need.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
fuser /path/to/file
Why it's wrong here
fuser also shows PIDs, but lsof is more widely used and provides more detail.
- ✓
lsof /path/to/file
Why this is correct
lsof lists all open files and the processes that opened them.
- ✗
ps aux | grep file
Why it's wrong here
ps shows running processes, not which files they have open.
- ✗
stat /path/to/file
Why it's wrong here
stat shows file metadata, not which process has it open.
Go deeper
Related to this question
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.