Dot files always first in directory?

Bob Lenk rml at hpfcdc.HP.COM
Sat May 6 05:07:40 AEST 1989


In any file system implementation derived from any of the traditional
AT&T or BSD systems, if the directory was created by mkdir(1) or
mkdir(2) and nothing abnormal has occurred, the first two entries will
be "." and "..".  However, that includes a number of assumptions that
reduce portability.  There are other file system implementations.  Even
on traditional implementations it is possible for superusers to mknod(2)
directories without "." and ".." or to unlink(2) these entries.  It is
easy enough to write code that tolerates but does not depend on seeing
these entries anywhere in a directory (which is what POSIX requires for
portable applications).

		Bob Lenk
		hplabs!hpfcla!rml
		rml%hpfcla at hplabs.hp.com



More information about the Comp.unix.wizards mailing list