The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Script fails
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 08-09-2006
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,429
With AIX, the df command output shows the free space in the field 3 and the field header is'nt 'avail' but 'Free'.

Code:
$ df -k /opt
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           163840     32724   81%     1847     3% /

The -P option (Displays information on the file system in POSIX portable format) gives output compatible with your script :

Code:
$ df -kP /opt
Filesystem    1024-blocks      Used Available Capacity Mounted on
/dev/hd4           163840    131116     32724      81% /

Jean-Pierre.

Last edited by aigles; 08-09-2006 at 05:20 AM..