XK0-006 System Management Practice Question
A Linux administrator needs to locate all files in /var/log that were modified more than 7 days ago. Which command should be used?
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
✓
find /var/log -mtime +7
The find command with -mtime +7 finds files modified more than 7 days ago. locate uses a database and does not support -mtime; grep is for text search; ls does not filter by modification time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
find /var/log -mtime +7
Why this is correct
Correct: find with -mtime +7.
- ✗
grep -mtime +7 /var/log
Why it's wrong here
grep does not have -mtime.
- ✗
ls -mtime +7 /var/log
Why it's wrong here
ls does not support -mtime.
- ✗
locate -mtime +7 /var/log
Why it's wrong here
locate does not support -mtime.
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.