check folder size terminal linux code example
Example 1: ubuntu get folder size
du -hs /path/to/directory
Example 2: see how large a directory is linux
# du -a /home | sort -n -r | head -n 5
du -hs /path/to/directory
# du -a /home | sort -n -r | head -n 5