du - Linux command line for displaying the disk usage informationFollow @ggarron
When you ever need to know how much space a file or directory is using on your disk, you should use du, this command line command, is great for the job
du [options] [file or dir]
If you use it with no arguments you will the usage of all files and directories (recursively) of the working directory.
- write counts for all files, not just directories
- -B zs
- Use size-byte blocks, so it means you will have the size in the number of block at the size you specified on the sz, example: -B M (will get the output in blocks of megabytes)
- Displays the grand total at the end
- Shows the in human readable format, so with K, M, G suffix near the size
- Displays the size of the symbolic linked directories instead of the symbolic link itself
- Opposite to -L, this time it shows the size of the symbolic link and the size of the file linked, this is the default
- Sumarize, so it displays the total of each subdirectory and not for its contents
Really a useful tool when you are running out of disk space, and need to know which directory or files are using that space.