Bird
0
0

You want to find all files modified in the last 7 days in your home directory. Which command is correct?

hard📝 Application Q8 of 15
Linux CLI - Searching and Finding
You want to find all files modified in the last 7 days in your home directory. Which command is correct?
Afind ~/ -type f -mtime -7
Bfind ~/ -type f -mtime 7
Cfind ~/ -type d -mtime -7
Dfind ~/ -mtime -7
Step-by-Step Solution
Solution:
  1. Step 1: Use -mtime -7 to find files modified within last 7 days

    -mtime -7 means modified less than 7 days ago.
  2. Step 2: Use -type f to find files only

    We want files, so -type f is needed.
  3. Final Answer:

    find ~/ -type f -mtime -7 -> Option A
  4. Quick Check:

    Use -mtime -N for files modified within N days [OK]
Quick Trick: Use -mtime -N for files modified within last N days [OK]
Common Mistakes:
  • Using -mtime 7 (exactly 7 days ago)
  • Using -type d for files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes