Bird
0
0

You run du -h /home/user but get an error: "du: invalid option -- 'h'". What is the likely cause?

medium📝 Debug Q14 of 15
Linux CLI - Disk and Storage
You run du -h /home/user but get an error: "du: invalid option -- 'h'". What is the likely cause?
AThe directory /home/user does not exist
BYou need to run the command as root
CThe <code>du</code> command does not support the <code>-h</code> option on this system
DYou must use <code>--human-readable</code> instead of <code>-h</code>
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    The error says -h is invalid, meaning this du version lacks that option.
  2. Step 2: Check other options

    Running as root or directory existence wouldn't cause invalid option error; -h is standard, no need for long form.
  3. Final Answer:

    The du command does not support the -h option on this system -> Option C
  4. Quick Check:

    Invalid option error means unsupported flag [OK]
Quick Trick: Invalid option means your du version lacks that flag [OK]
Common Mistakes:
  • Assuming permission or path errors cause invalid option
  • Trying --human-readable instead of checking version
  • Ignoring error message details

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes