Scanning used storage

Almost everyone experiences a situation where disk space seems to vanish, with no clear indication as to what is taking up all the space. There are multiple ways in which you can troubleshoot what in particular is eating your hard drive space for breakfast. In order to see an overview of your mounted filesystems as well as their used and free space, execute the df command. Using -h with df is easier to read for most people, as it will show used space in MB and GB:

df -h

Armed with that information, you'll know exactly what device is being used up and what volumes to focus your attention on. But the df command doesn't actually tell you what is using up all the space; it only gives you an overview of the current situation.

Get Mastering Linux Network Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.