[CentOS] df to get total disk usage on all filesystems?
Aleksey Tsalolikhin
atsaloli.tech at gmail.com
Mon Aug 11 19:07:09 UTC 2008
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 at gmail.com> 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 at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
More information about the CentOS
mailing list