Bird
0
0

What will be the output of the command du -sh /tmp if the /tmp directory uses 512M of disk space?

medium📝 Command Output Q4 of 15
Linux CLI - Disk and Storage
What will be the output of the command du -sh /tmp if the /tmp directory uses 512M of disk space?
A512M
B512M /tmp
C512 /tmp
D/tmp 512M
Step-by-Step Solution
Solution:
  1. Step 1: Understand -s and -h options

    -s shows total size only, -h makes it human-readable.
  2. Step 2: Predict output format

    The output shows size first, then directory path, e.g., "512M /tmp".
  3. Final Answer:

    512M /tmp -> Option B
  4. Quick Check:

    du -sh output = size + path [OK]
Quick Trick: Output format: size first, then directory path [OK]
Common Mistakes:
  • Expecting size only
  • Swapping size and path order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes