[CentOS] df to get total disk usage on all filesystems?
Stephen Harris
lists at spuddy.org
Mon Aug 11 19:19:47 UTC 2008
On Mon, Aug 11, 2008 at 12:07:09PM -0700, Aleksey Tsalolikhin wrote:
> value. I suggest using the -P switch to df, so you don't have to deal
> with multi-line output per filesystem.
Ugh, hasn't RedHat fixed that? Sun have (for a long time) automatically
done this if stdout is not a terminal.
*sigh*.
So my previous mail should really be
df -Pkl | awk '/^\/dev\// { avail += $3/1024 } END { printf("%d Mb used\n",avail)} '
--
rgds
Stephen
More information about the CentOS
mailing list