Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

df space summary

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Dear All,
Does anyone have tips on how to display disk space summary report. Using command df ,I can't get the infor.
TQ in advance
 
df -k should give you figures for disc capacity, usage and availabilty plus usage as a percentage of capacity

e.g
capacity usage avail %use
/usr 1000000 500000 500000 50%
 
I wonder whether by 'summary' you mean a total of all filesystems on the one line? I'm afraid I don't know of a way to accomplish that, but can't imagine it would be of much use in any case. As trunix says, df -k will give you summary info. per filesystem. HTH.
 
Hi All,
It's great! all of u are so helpful and I got the answer from your great ideas.
I need the summary in 1 line for mthly mgt report else I've to perform manual computation using lsvg.
 
Or you can stick a regex in the awk statement rather than spawn a separate process for grep. A picky detail, I know.

df -k | awk ' /pattern/ {sum+=$3} END{print sum}'

That will probably work. Use your own pattern.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top