Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!uw-june!ka From: ka@uw-june.UUCP (Kenneth Almquist) Newsgroups: comp.unix.wizards Subject: Re: /bin/test and stat(2) Message-ID: <3283@uw-june.UUCP> Date: Tue, 13-Oct-87 18:06:56 EDT Article-I.D.: uw-june.3283 Posted: Tue Oct 13 18:06:56 1987 Date-Received: Thu, 15-Oct-87 04:08:21 EDT References: <9721@brl-adm.ARPA> <1849@munnari.oz> <6555@brl-smoke.ARPA> Organization: U of Washington, CSCI, Seattle Lines: 19 >> "" is the ONLY totally reliable way for a process to access its current >> directory, "." searches the current directory file the name "." and >> normally finds an inode which is usually the current directory. But >> this is not guaranteed. > > "." IS guaranteed to refer to the current directory, unless your > filesystem is corrupted, in which case you should fix it (fsck etc.). Under either System V or 4.3 BSD, do: mkdir junk cd junk rmdir ../junk ls . This will tell you that "." does not exist, because under these versions of UN*X the entry for "." is removed from a directory when rmdir runs, rather than when the all the processes using the directory finally finish. Does this mean that System V and 4.3 BSD don't conform to POSIX? Kenneth Almquist