I wanted to know the Red Hat Linux command for cumulative disk space usage and the free space as df -h gives used and free space individually for the drives. Or, a command to check free space on the server would also be fine.
There's got to be a neat way of summing a column which meets given criteria using awk only, which someone will no doubt enlighten me with.
In the interim, this works under bash and ensures that the tempfs isn't counted as real space
total_free=0;for i in $(df -k | egrep '^/dev'| awk '{print $4}' ) ; do total_free=$(($total_free + $i)); done ; echo Total free space on $(hostname) is ${total_free}K