back to labs
Disk Usage: Find the Space Hog
MediumLinux+ Exam Prep10-15 minThe brief
A filesystem is filling up and you need to find the culprit directory fast. Under /root/data there are several subdirectories (names and sizes differ per session). Use du to find the subdirectory using the most DISK SPACE and record its name (just the basename, e.g. 'logs') to /root/answers/largest.txt. Careful: ls -l reports a file's apparent size, and a sparse file can look huge while using almost nothing — du measures what's actually allocated.
du -sh /root/data/* # size per subdir, human-readable
Grading checks the recorded name against what du measures on this machine.
What you'll do
- Record the subdirectory using the most disk space to /root/answers/largest.txt
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
