Challenge - 5 Problems
Disk Space Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Understanding the output of
df -hWhat is the output of the command
df -h on a typical Linux system?Linux CLI
df -h
Attempts:
2 left
💡 Hint
The
-h option means human-readable sizes.✗ Incorrect
The
df -h command displays disk space usage with sizes in easy-to-read units like KB, MB, or GB.💻 Command Output
intermediate1:30remaining
Output of
df --totalWhat does the
df --total command add to the usual df output?Linux CLI
df --total
Attempts:
2 left
💡 Hint
Look for a line labeled 'total' at the end.
✗ Incorrect
The
--total option adds a summary line that sums up all disk usage values from the listed filesystems.📝 Syntax
advanced1:30remaining
Correct usage of
df to show inode usageWhich command correctly shows inode usage with
df?Attempts:
2 left
💡 Hint
The option for inode info is a short flag.
✗ Incorrect
The
-i option shows inode usage. --inodes and --inode-usage are invalid options.🔧 Debug
advanced1:30remaining
Why does
df /nonexistent fail?What error does the command
df /nonexistent produce and why?Linux CLI
df /nonexistent
Attempts:
2 left
💡 Hint
Check if the path exists before running df.
✗ Incorrect
If the path does not exist,
df cannot find the filesystem and returns a 'No such file or directory' error.🚀 Application
expert2:00remaining
Automate disk usage alert with
dfYou want to write a script that alerts you if any mounted filesystem is more than 90% full. Which command pipeline correctly extracts the usage percentage and filters filesystems over 90%?
Attempts:
2 left
💡 Hint
You need to remove the % sign before comparing numbers.
✗ Incorrect
Option B removes the % sign from the 5th column and compares the numeric value correctly. Others either miss removing % or skip header properly.