Bird
0
0

How would you find files modified between 3 and 7 days ago in /data directory?

hard📝 Application Q9 of 15
Linux CLI - Searching and Finding
How would you find files modified between 3 and 7 days ago in /data directory?
Afind /data -mtime +7 -mtime -3 -type f
Bfind /data -mtime +3 -mtime -7 -type f
Cfind /data -mtime 3 -mtime 7 -type f
Dfind /data -mtime -3 -mtime +7 -type f
Step-by-Step Solution
Solution:
  1. Step 1: Understand range selection with -mtime

    -mtime +3 means modified more than 3 days ago, -mtime -7 means modified less than 7 days ago.
  2. Step 2: Combine both to get files modified between 3 and 7 days ago

    Using both options together filters files in that range.
  3. Final Answer:

    find /data -mtime +3 -mtime -7 -type f -> Option B
  4. Quick Check:

    Range between 3 and 7 days = +3 and -7 [OK]
Quick Trick: Use + and - with same option to set range [OK]
Common Mistakes:
  • Swapping signs
  • Using exact numbers instead of ranges

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes