Re: df to get total disk usage on all filesystems?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> 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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux