0

Tip #249   Sum up your HDD space

Longish oneliner (I actually wrote it in one line first) for giving you somewhat (mount list is never good enough) accurate sum of your file systems' totals.


df | egrep -v "(Filesystem|\/dev$|shm$|dvd|cdrom)" | awk '{totalu += $2 ; totalf += $4} END {print "Total space in devices: " (totalu/1024/1024) " GB\nFree space total: " (totalf/1024/1024) " GB"}'