I'd recommend using ncdu
, which stands for NCurses Disk Usage. Basically it's a collapsible version of du
, with a basic command line user interface.
One thing worth noting is that it runs a bit slower than du
on large amounts of data, so I'd recommend running it in a screen
or using the command line options to first scan the directory and then view the results. Note the q
option, it reduces the refresh rate from 1/10th of a second to 2 seconds, recommended for SSH connections.
Viewing total root space usage:
ncdu -xq /
Generate results file and view later:
ncdu -1xqo- / | gzip > export.gz# ...some time later:zcat export.gz | ncdu -f-