[NTLUG:Discuss] total drive size

Fred James fredjame at concentric.net
Wed Mar 12 10:40:05 CST 2003


df -k | grep -v block | awk -f awkscriptname > outputfilename
Where awkscriptfilename contains some variation of:
 >>
BEGIN { Total = 0 }
{
    Total += $2
}
END { print Total }
<<

Bishop, Cass wrote:

>I should have explained my situation more completely.  I need to find out
>the total disk space on many systems.  I could use df but it does not
>provide a total for all partitions.  This means that I need to run it then
>do the math.  This would be very time consuming.
>
>What I was hoping for is a command, or series of commands that can get the
>info for each partition then total it up for me.  I have started with this
>to get a list of partition sizes but I'm not sure what to do with it now.  I
>need to total this number and make it human readable(like the df -h option).
>
>df|cut -c 20-29|grep -v block
>
>I'd like to make it a single command string to run from a single box to all
>of my other ones using ssh.  Does anyone have any tips?
>
>Cass
>
>
>-----Original Message-----
>From: joseph beasley [mailto:joe_beasley at yahoo.com]
>Sent: Wednesday, March 12, 2003 10:09 AM
>To: NTLUG Discussion List
>Subject: Re: [NTLUG:Discuss] total drive size
>
>
>df -k 
>
>should work.
>
>-Yahoo Messenger          joe_beasley
>MSN Messenger            joebeasley3rd
>ICQ                      13164242
>
>
>CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
>confidential.  Any use, copying or dissemination of any portion of this
>e-mail by or to anyone other than the intended recipient(s) is unauthorized.
>If you have received this e-mail in error, please reply to sender and delete
>it from your system immediately.
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss
>
>
>  
>


-- 
"It's not nice to fool Mother OS." --anonymous





More information about the Discuss mailing list