Bird
0
0

You want to find the total disk usage of all subdirectories inside /home/user but only see sizes for individual files. Which command correctly summarizes each subdirectory size in human-readable form?

hard📝 Application Q15 of 15
Linux CLI - Disk and Storage
You want to find the total disk usage of all subdirectories inside /home/user but only see sizes for individual files. Which command correctly summarizes each subdirectory size in human-readable form?
Adu -sh /home/user/*
Bdu -ah /home/user
Cdu -h /home/user
Ddu -s /home/user
Step-by-Step Solution
Solution:
  1. Step 1: Understand the goal

    You want sizes of each subdirectory summarized, not individual files.
  2. Step 2: Analyze options

    du -ah shows all files and dirs, du -sh on directory alone summarizes total only, du -s no human-readable. du -sh /home/user/* summarizes each subdirectory separately in human-readable form.
  3. Final Answer:

    du -sh /home/user/* -> Option A
  4. Quick Check:

    Use du -sh with wildcard for each subdir [OK]
Quick Trick: Use du -sh with * to summarize each subdirectory [OK]
Common Mistakes:
  • Using -a to include files instead of just dirs
  • Using -s alone for total only
  • Not using wildcard to list subdirectories

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes