null file names

dmr at research.UUCP dmr at research.UUCP
Thu Sep 13 14:02:20 AEST 1984


"If the sequence [of file names] begins with a slash, the search begins
in the root directory.... As a limiting case, the name `/' refers to
the root itself.... A path name not starting with `/' causes the system
to begin the search in the user's current directory.... As another
limiting case, the null file name refers to the current directory."
	-- from the CACM Unix paper, 1974.

Actually, I was considerably annoyed when USG illegalized "" because
it is indeed the natural limiting case, and because (at the time) I could
get no coherent explanation for the change except that some program
had a bug and they preferred to change the semantics of file names
instead of fixing the bug.

The annoyance is lessened now, I suppose because no one actually uses
the null file name (though it makes "." unnecessary).  Also, it has
inconvenient properties under concatenation  (e.g. "" + "/file" = wrong).
And, as I discover while investigating SysV, it sure makes for some
peculiar diagnostics.

				Dennis Ritchie



More information about the Comp.unix.wizards mailing list