Linux disk usage by folder code example
Example 1: linux how to know whhich directory used more soace
$ du -h --max-depth=1 | sort -hr
Example 2: linux check used space in folder
du -h --max-depth=1
Example 3: linux disk usage
#sudo apt-get install ncdu
sudo ncdu -rx /
# -r = read-only
# -x = do not traverse mounts
Example 4: du command linux usage
Ubuntu DU for file:
du -h --human-readable <fileName>
Ubuntu DU for directory:
du -a --all <dir>