ITEM: AF4544L

How to list only local filesystems with df


Question:

Env:    

AIX 3.2.5

Desc:

Customer has remote mounted filesystems and wants to prevent the 
df command from hanging when it cannot see these filesystems.  He 
set the free stanza in /etc/filesystems to false, but this did not
affect the output of df.

Action:

AIX ignores the free stanza entry in /etc/filesystems and there 
is not a command that will do exactly what the customer is
trying to do.  However, here is a command line that should allow
him to display only the jfs filesystems with df.  This should not
hang if there is an NFS server that is currently down.

df $(lsfs -c -v jfs | awk -F: "/\^\\// {printf(\\"%s\\n\\", \\$1);}" \\
  | egrep -v /blv)

This could be put into a script and run whenever the user only
wants to see the local filesystems.

Note: lsfs will list out all filesystems defined on the system, 
      whether they are mounted or not.  If you use df on an 
      unmounted filesystem you will get the information for the 
      parent filesystem.  Therefore, the above command may give
      multiple output lines for the same filesystem.


Support Line: How to list only local filesystems with df ITEM: AF4544L
Dated: February 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:28
Comments or suggestions? Contact us