check how big a directory is in linux code example
Example 1: command to check size of folder in linux
du -lh --max-depth=1 --block-size=M | sort -nr
Example 2: see how large a directory is linux
# du -a /home | sort -n -r | head -n 5
du -lh --max-depth=1 --block-size=M | sort -nr
# du -a /home | sort -n -r | head -n 5