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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

df command on older AIX version can u upgrade to show Gigs

Status
Not open for further replies.

jpn1

Technical User
Jul 9, 2007
34
US
I have many AIX servers ranging from 4.3.3.3 to 6.1. I always hate looking at the disks on the older boxes because I have to translate the 512 blocks or 1024 blocks to gigs. Where as the new servers have the df -g. Is there a way to upgrade the df command on the older servers to display GigaBytes?
 
There is no supported way to upgrade the AIX df command on earlier versions to support function from a later version. If you can install GNU coreutils which contains df then you could install a "lowest common denominator" level of it to all your machines.
 
Code:
df -k | awk -v i=0 '{i+=int($3); print ( $1 "\t" $7 "\t" ($3/1024) " mb " "\t" (i/1024)/1024 " gb");}'
 
Hi,

There is a little mistake ... You can try this :

Code:
df -k | awk -v i=0 '{i+=int($3); print ( $1 "\t" $7 "\t" ($3/1024) " mb " "\t" ($3/1024)/1024 " gb");}'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top