LFCS -mtime Practice Question
A system administrator needs to find all files under /var/log that have been modified within the last 7 days. Which command accomplishes this task?
⚠ Common exam trap
Candidates often confuse `-mtime` (modification time) with `-ctime` (change time) or `-atime` (access time), leading them to pick an option that checks the wrong timestamp for the task of finding recently modified files.
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 -mmin -10080
Options B and C are both correct because the `find` command can search for files modified within the last 7 days using either `-mtime -7` (modification time in days) or `-mmin -10080` (modification time in minutes, where 10080 minutes equals 7 days). Option A checks access time (`-atime`), not modification time. Option D checks change time (`-ctime`), which includes metadata changes. Therefore, both B and C achieve the task.
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 -atime -7
Why it's wrong here
Incorrect because `-atime` checks access time, not modification time.
- ✓
find /var/log -mmin -10080
Why this is correct
Correct because `-mmin -10080` searches for files modified within the last 10080 minutes, which is equivalent to 7 days.
- ✓
find /var/log -mtime -7
Why this is correct
Correct because `-mtime -7` searches for files modified within the last 7 days.
- ✗
find /var/log -ctime -7
Why it's wrong here
Incorrect because `-ctime` checks change time, which includes metadata changes, not just content modification.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 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 LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.