Challenge - 5 Problems
Disk Space Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Disk usage percentage extraction
What is the output of this command snippet that extracts disk usage percentage for root (/) partition?
Bash Scripting
df / | tail -1 | awk '{print $5}'
Attempts:
2 left
💡 Hint
Look at the fifth column of the df output for root partition.
✗ Incorrect
The df command shows disk usage. The fifth column is the percentage used, including the percent sign.
❓ Configuration
intermediate1:30remaining
Cron job for disk space alert
Which cron job entry runs a disk space check script every day at 6 AM?
Attempts:
2 left
💡 Hint
Cron format is: minute hour day month weekday
✗ Incorrect
The entry '0 6 * * *' means at minute 0, hour 6, every day, every month, every weekday.
❓ Troubleshoot
advanced2:00remaining
Script fails to send alert email
A disk space monitoring script uses 'mail' command to send alerts but no emails are received. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check if the mail command works independently.
✗ Incorrect
If mail is not installed or configured, the script cannot send emails even if triggered.
🔀 Workflow
advanced2:30remaining
Disk space alert workflow
Which sequence correctly describes a disk space alert workflow?
Attempts:
2 left
💡 Hint
Think about the logical order of checking, comparing, alerting, then logging.
✗ Incorrect
First check usage, then compare to threshold, then alert if needed, finally log the event.
✅ Best Practice
expert3:00remaining
Efficient disk space monitoring script design
Which practice improves efficiency and reliability of a disk space monitoring script?
Attempts:
2 left
💡 Hint
Minimize system calls and centralize configuration for maintainability.
✗ Incorrect
Using one df command reduces overhead and parsing all partitions at once is efficient and reliable.