Problem Statement
How do you identify which directories are using the most disk space?
Explanation
The du command is used to measure disk usage recursively.
Combine it with sort to list directories from largest to smallest, helping clean up space efficiently.
Code Solution
SolutionRead Only
du -h --max-depth=1 /var | sort -hr | head
Practice Sets
This question appears in the following practice sets: