Bird
0
0

Identify the error in this command:

medium📝 Debug Q6 of 15
Linux CLI - Searching and Finding
Identify the error in this command:
find /data -type f -name '*.csv' -exec cp {} /backup
AIncorrect directory path
BMissing \; at the end of the -exec command
CUsing cp instead of mv
DWrong file extension pattern
Step-by-Step Solution
Solution:
  1. Step 1: Check the syntax of -exec

    The -exec command must end with \; to terminate properly.
  2. Step 2: Verify other parts

    The file pattern and directories are correct; the error is the missing terminator.
  3. Final Answer:

    Missing \; at the end of the -exec command -> Option B
  4. Quick Check:

    Always end -exec commands with \; = D [OK]
Quick Trick: Always finish -exec commands with \; [OK]
Common Mistakes:
  • Forgetting \; at the end
  • Changing file extension unnecessarily
  • Confusing cp and mv commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes