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)} '