In server monitoring, one of the most challenging tasks is disk space utilization monitoring.

Several files will grow in size over time, and your storage space will begin to shrink. It's important to understand which file(s) or folders are using all of your disk space such as /tmp/ or /var/ or /home/.

This guide will show you how to find the filesystem's ( top 10 ) largest size of files or folders on your system.

To find the top 10 largest files/directories, type the following command at the shell prompt:

### If no path is specified, the current working directory will be used.

du -ah <DirectoryPath> |sort -rh | head -10   

Use this command to find out how much space is being used in the entire system.

sudo -i  ### switch to root

du -ah / |sort -rh | head -10

Where,

du command -a  option: Report size of each file or directory disk usage within the directory.
du command -h option : display sizes in human readable format (e.g. 1K, 234M, 2G).
sort command -r option : reverse the result of comparisons.
sort command -h option : compare human readable numbers. This is GNU sort specific option only.
head command -10 : display the first 10 lines.

snippets:

The above specified command will only work of  GNU/sort is installed.