Check disk space availability
df -h
Get size of folder
du -sh FOLDER
Get size of files in folder
ls -l --block-size=M
^^ Also works with G
Sort file size, largest first, human readable
ls -lSh
Sort file size, smallet first, human readable
ls -lShr
Check disk use (GB and MB)
du --max-depth=5 -chax 2>&1 | grep '[0-9\.]\+G' | sort -hr | head
du --max-depth=5 -chax 2>&1 | grep '[0-9\.]\+M' | sort -hr | head
^^ Works best from root '/' dir
check disk inode availability
df -i
Check folders using the most inodes:
find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n | tail -20
Replace with filepaths as needed