Bird
0
0

Why does this command fail?

medium📝 Debug Q7 of 15
Linux CLI - Pipes and Redirection
Why does this command fail?
echo 'file1 file2' | xargs -n 0 rm
A-n 0 is invalid because zero arguments per command is not allowed
Brm command requires -I option to work with xargs
Cxargs cannot handle multiple files without -d option
DThe echo command should use -n option
Step-by-Step Solution
Solution:
  1. Step 1: Understand -n option limits

    -n 0 means zero arguments per command, which is invalid.
  2. Step 2: Confirm failure reason

    Zero arguments means no command execution, causing failure.
  3. Final Answer:

    -n 0 is invalid because zero arguments per command is not allowed -> Option A
  4. Quick Check:

    -n 0 invalid argument count [OK]
Quick Trick: -n must be > 0 to run commands [OK]
Common Mistakes:
  • Using -n 0 thinking it means unlimited
  • Confusing -I necessity with -n usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes