EX200 Essential Tools Practice Question
A system administrator needs to find all files modified in the last 24 hours under /var/log. Which command accomplishes this?
⚠ Common exam trap
Test-takers frequently confuse `-mtime -1` (modified within the last 24 hours) with `-mtime 1` (modified exactly 1 day ago) or with `-ctime` (metadata change), leading candidates to pick options that check the wrong timestamp or an exact time rather than a range.
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 -1
`find /var/log -mtime -1` searches for files under `/var/log` whose modification time (`mtime`) is less than 1 day ago (i.e., modified within the last 24 hours). The `-mtime` flag checks the last modification time of file content, which is the standard criterion for 'modified' files.
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 -ctime -1
Why it's wrong here
The -ctime -1 predicate filters on the inode change time (ctime), not the modification time. ctime is updated not only when file content changes, but also whenever metadata such as permissions, ownership, or link count is altered, so this command would return files that had a chmod or chown in the last 24 hours even if their content was not modified. That makes it unsuitable for finding files whose data was edited.
- ✗
find /var/log -atime -1
Why it's wrong here
Using -atime -1 selects files based on access time (atime), which is updated whenever a file is read, examined, or executed. Log files are frequently read by system utilities, admins, or monitoring agents, so this predicate would include many false positives that were merely opened but never modified. Access time does not reflect content changes, so it is the wrong basis for locating recently modified log files.
- ✗
find /var/log -mmin 1440
Why it's wrong here
The -mmin predicate expects a number of minutes, and 1440 minutes equals exactly 24 hours; however, without a leading minus sign, -mmin 1440 matches files modified exactly 1440 minutes ago, not within the last 24 hours. To find files modified in the past 24 hours with minute granularity, the correct expression is -mmin -1440, meaning 'less than 1440 minutes ago.' Since the proposed command omits the negative sign, it will typically return no files unless a log was modified at that precise instant.
- ✓
find /var/log -mtime -1
Why this is correct
This is the correct command because -mtime -1 specifically filters on the modification time (mtime) and the leading minus sign means 'less than one day old,' i.e., files whose content was last changed within the past 24 hours. Unlike ctime or atime, mtime only updates when the file's data is written to, which is exactly what is needed to identify recently modified log files. In find's age arithmetic, -mtime -1 corresponds to 'less than one 24-hour period,' so it reliably catches all files modified since the same time yesterday.
Go deeper
Related to this question
About these practice questions
One of 427 original EX200 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.