George Liu

Commonly used instruction aboud disk space

Blog Post created by George Liu on Apr 22, 2018

Backup file content sorted by file size

tar ztvf backup_files.tgz | sort -k 3 -rn > a.log

 

Disk usage sort bye MB
du -h | grep -v K | grep M | sort -nr -t 1 > du_m.log

 

Disk usage sort bye GB
du -h | grep -v K | grep G | sort -nr -t 1 > du_g.log


Get summary disk usage by 1 level depth of folder

du -hcx --max-depth=1 /var

Outcomes