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

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



Dear Sean,

  No, there isn't.   You'd have to parse the df output to get that
value.  I suggest using the -P switch to df, so you don't have to deal
with multi-line output per filesystem.

  The following will return kilobytes of disk space used (third column
in the df -kP output):

df -kP |grep -v ^Filesystem |awk '{sum += $3} END { print sum; }  '


Best,
-at

On 8/11/08, Sean Carolan <scarolan@xxxxxxxxx> wrote:
> 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.
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
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