Bird
0
0

What does the -exec option do in the find command?

easy📝 Conceptual Q11 of 15
Linux CLI - Searching and Finding
What does the -exec option do in the find command?
AChanges the permissions of files found automatically.
BRuns a specified command on each file found by <code>find</code>.
CLists only directories found by <code>find</code>.
DDeletes all files found without confirmation.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of -exec

    The -exec option in find runs a command on each file found by the search.
  2. Step 2: Differentiate from other options

    It does not delete, list only directories, or change permissions by itself; it just runs the given command.
  3. Final Answer:

    Runs a specified command on each file found by find. -> Option B
  4. Quick Check:

    -exec runs commands on found files [OK]
Quick Trick: Remember: -exec means "execute command" on files [OK]
Common Mistakes:
  • Thinking -exec deletes files automatically
  • Confusing -exec with listing or filtering options
  • Forgetting to end -exec command with \;

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes