1834010 Members
2142 Online
110063 Solutions
New Discussion

To know free space

 
Deepu Chakravarty
Regular Advisor

To know free space

How to know free space available in each file systems and also free space available in total altogether of all file systems ?
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: To know free space

bdf


Pete



Pete
Umapathy S
Honored Contributor

Re: To know free space

Deepu,
bdf will give the details. man bdf for more info.

Alternatively, di is a useful tool. you can get it here
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/di-3.3/

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Stefan Farrelly
Honored Contributor

Re: To know free space

bdf
or
du -sk
or
df

or bdf2.sh script has a total at the bottom. Its attached.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Mark Grant
Honored Contributor

Re: To know free space

"bdf" shows space available for each filesystem but you are going to have to add up the columns yourself or in a script if you want the totals.

Remember thath if you are trying to find how much total space your machine is using that you'll need to include swap which youc an see with "swapinfo"
Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor

Re: To know free space

Or you might want to try the "bdfmegs" script (originally suggested by Bill Hassell). Attached.


Pete



Pete
Hoefnix
Honored Contributor

Re: To know free space

To get the total free space in Kb in all filesystems you can do the next:
bdf | grep -v Filesystem | awk 'BEGIN {total=0} { total+=$4 } END {printf "Total in Kb=%u\n",total}'

The other question the previous replies gave the correct anwser: bdf