Bird
0
0

A user runs cat -z file.txt and gets an error. Why?

medium📝 Debug Q7 of 15
Linux CLI - Viewing and Editing Files
A user runs cat -z file.txt and gets an error. Why?
AThe file <code>file.txt</code> does not exist
BThe <code>-z</code> option is invalid for <code>cat</code>
CThe user lacks read permission
DThe command needs sudo
Step-by-Step Solution
Solution:
  1. Step 1: Check the option -z validity

    cat does not have a -z option; this causes an error.
  2. Step 2: Consider other possible errors

    File existence or permissions cause different errors, not invalid option errors.
  3. Final Answer:

    The -z option is invalid for cat -> Option B
  4. Quick Check:

    Invalid options cause errors in cat [OK]
Quick Trick: Use cat --help to check valid options [OK]
Common Mistakes:
MISTAKES
  • Assuming file missing causes option error
  • Confusing permissions with option errors
  • Thinking sudo fixes option errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes