Bird
0
0

You run du -sh /etc /var but get an error: "du: invalid option -- 's'". What is the likely cause?

medium📝 Debug Q6 of 15
Linux CLI - Disk and Storage
You run du -sh /etc /var but get an error: "du: invalid option -- 's'". What is the likely cause?
AThe <code>-s</code> option is not supported by your <code>du</code> version
BYou typed <code>-sh</code> as separate options instead of combined
CYou need to run the command as root
DThe directories do not exist
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    "invalid option -- 's'" means the du command does not recognize -s.
  2. Step 2: Understand version differences

    Some older or minimal du versions lack -s support.
  3. Final Answer:

    The -s option is not supported by your du version -> Option A
  4. Quick Check:

    Error about option = unsupported option [OK]
Quick Trick: Check du --version if options fail [OK]
Common Mistakes:
  • Assuming syntax error
  • Ignoring version compatibility

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes