Came across article so, thought I might document it here as well.
As I always struggled in command line to work out disk quota, usage and other statistical means of working out what could be using the disk. Apart from df -hl, I was unable to work out directory sizes and order them and so on. Just like you would be able to in a graphical user interface.
So, here are some commands and tools to assist in that process.
Quoted from linux.com article :
The CLI way
The df utility displays the disk space usage on all mounted filesystems. The -T option prints the filesystem type as well. By default, df measures the size in 1K blocks, which could be a little difficult for a desktop user to decipher. Use the -h option to get more understandable output:
$ df -h -T
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda6 ext3 20G 9.3G 9.1G 51% /
/dev/hda7 reiserfs 13G 2.1G 11G 17% /mnt/suse
/dev/sda1 vfat 241M 152M 90M 63% /media/usbdisk
If you want the size of an particular directory, specify it with du directoryname . For instance, du -h /home/bodhi/podcast will print the size of the podcasts directory in a more readable format than the kilobytes used by default. The -c option prints the grand total size of the directory at the end. The -a option also displays the file names along with directories and can be of use when you want to see a list of files in a particular directory. The -s option will display a summary, without showing all of the subdirectories.
Running du -ch | grep total prints just one line with the total size of the directory. If there's a particular type of file that you would like to be excluded while calculating a directory's usage, specify it with the --exclude=type option. Here we'll check the disk usage of the current directory, and display all file names with their disk usage, and then sort them numerically using the sort utility:
$ du -ah | sort -n
4.2M ./eweek.10.28.05.mp3
4.5M ./LQ-Podcast-101105.mp3
4.8M ./LQ-Podcast-110905.mp3
19M ./LQRadio-Episode3.mp3
20M ./LQRadio-Searls.mp3
36M ./LQRadio-HiserAndAdelstein.mp3
197M .
One... trick the article fails to mention is using sort in conjunction with duh in order to sort the highest usage of directory or file size.