Bird
0
0

You want to find all files larger than 10MB named backup.tar anywhere under /data and move them to /archive. Which command correctly combines find and move to save time?

hard📝 Application Q9 of 15
Linux CLI - Searching and Finding
You want to find all files larger than 10MB named backup.tar anywhere under /data and move them to /archive. Which command correctly combines find and move to save time?
Afind /data -name 'backup.tar' -size +10M | mv /archive
Bmv /data/backup.tar /archive
Cfind /data -name 'backup.tar' -size 10M -move /archive
Dfind /data -name 'backup.tar' -size +10M -exec mv {} /archive \;
Step-by-Step Solution
Solution:
  1. Step 1: Use find with correct filters

    -name 'backup.tar' and -size +10M find files larger than 10MB named backup.tar.
  2. Step 2: Use -exec to move each file

    -exec mv {} /archive \; moves each found file to /archive safely.
  3. Final Answer:

    find /data -name 'backup.tar' -size +10M -exec mv {} /archive \; -> Option D
  4. Quick Check:

    Find with exec move = A [OK]
Quick Trick: Use -exec mv {} target to move found files [OK]
Common Mistakes:
  • Using mv without find
  • Wrong size syntax
  • Piping find output directly to mv

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes