check space occupied directory linux code example
Example 1: linux how to know whhich directory used more soace
$ du -h --max-depth=1 | sort -hr
Example 2: linux command to list directory size
sudo du -sh /var
$ du -h --max-depth=1 | sort -hr
sudo du -sh /var