Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!chinacat!balkan!crcaus!john From: john@crcaus.cactus.org (John R. Miller) Newsgroups: comp.unix.aix Subject: Re: It works everywhere else, but not on AIX Summary: BSD behavior; works on AIXv3.1 Message-ID: <313@crcaus.cactus.org> Date: 18 Apr 91 09:14:46 GMT References: <1991Apr15.182214.10391@ux1.cso.uiuc.edu> Reply-To: john@crcaus.UUCP (John R. Miller) Organization: home Lines: 33 In article <1991Apr15.182214.10391@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes: >First of all, the "df" command does not always know how to find the file >system a particular path name it is given is on. This is what I get: > > phil@ux2:/u/phil 2> df . > Filesystem Total KB free %used iused %iused Mounted on > Cannot find file system . > phil@ux2:/u/phil 3> pwd > /u/phil > >So apparently I need some other way to find out the file system I am on >that is also portable over other UNIX platforms. Until AIX, that was "df" >itself. > >If IBM "designed" it this way... WHY? I can't tell from your posting which version of AIX you're running. This is normal USG behavior. On SysIII machines (for example) one has to give df a mount point or special file (i.e., a file system). This is the way df behaves on AIX2.2.1 on the rt. BSD allows one to specify a file and returns the free space of the file system on which it resides. "." is a common choice, but any file will do. This is the way df behaves on AIX3.1 on the s/6000. There was a problem with early releases of 3.1 in that df was suid bin so that if "." (or whatever) wasn't readable by bin df would fail. This has been corrected in later releases (3.1.5, I think.) Of course, it's simple enough to correct: just un-suid df. -- John R. Miller 13102 Briar Hollow Dr. Austin, Texas 78729 hm: 512/331-0155 john@crcaus.cactus.org or ..cs.utexas.edu!bigtex!crcaus!john wk: 512/823-3867 john@glasnost.austin.ibm.com