Bird
0
0

You want to find all files larger than 5MB in /home/user and change their permissions to 644. Which command correctly uses find with -exec to do this?

hard📝 Application Q15 of 15
Linux CLI - Searching and Finding
You want to find all files larger than 5MB in /home/user and change their permissions to 644. Which command correctly uses find with -exec to do this?
Afind /home/user -size +5M -exec chmod 644 {} \;
Bfind /home/user -size +5M -exec chmod 644 {} ;
Cfind /home/user -size +5M -exec chmod 644 \;
Dfind /home/user -size +5M -exec chmod 644 {}
Step-by-Step Solution
Solution:
  1. Step 1: Understand size filter and command

    -size +5M finds files larger than 5MB. chmod 644 {} changes permissions of each found file.
  2. Step 2: Confirm correct -exec syntax

    The command must end with \; to mark the end of the -exec action. find /home/user -size +5M -exec chmod 644 {} \; correctly includes this.
  3. Final Answer:

    find /home/user -size +5M -exec chmod 644 {} \; -> Option A
  4. Quick Check:

    Use -exec with {} and end with \; [OK]
Quick Trick: Use {} for file and end -exec with \; [OK]
Common Mistakes:
  • Omitting {} placeholder
  • Missing backslash before semicolon
  • Leaving out semicolon entirely

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes