linux check disk space code example
Example 1: how to check folder size in linux
# show all folder size in the current directory
du -h --max-depth=1
Example 2: see total space available in shell
df -hx squashfs --total
Example 3: linux check used space in folder
du -h --max-depth=1
Example 4: bash how to check free disk space in Linux
# Basic syntax:
df -h
# Where the -h flag ensures a "human readable" format