[CentOS] df to get total disk usage on all filesystems?

Mon Aug 11 19:06:49 UTC 2008
Stephen Harris <lists at spuddy.org>

> Is there a flag for the df command to get the total disk space used on
> all filesystems as one number?  I have a server with a lot of mounted
> shares.  I'm looking for a simple way to measure rate of data growth
> across all shares as one total value.

Not directly, but you can add up all the entries mounted from /dev with
a simple awk statement:

df -kl | awk '/^\/dev\// { avail += $3/1024 } END { printf("%d Mb used\n",avail)} '

-- 

rgds
Stephen