Linux Tip: List Directories by Size – du

Use the du comand to list your directories by size:

user@ubuntu:/boot$ du -hs *
632K abi-2.6.32-21-generic
120K config-2.6.32-21-generic
1.5M grub
7.7M initrd.img-2.6.32-21-generic
164K memtest86+.bin
1.7M System.map-2.6.32-21-generic
4.0K vmcoreinfo-2.6.32-21-generic
3.9M vmlinuz-2.6.32-21-generic

In this, ‘grub’ is a directory in the location. This command has a lot of options but usually I am just interested in this.

Comments are closed.