From owner-pups@minnie.cs.adfa.edu.au Tue Apr 18 08:23:34 2000
Received: (from major@localhost)
	by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id IAA38977
	for pups-liszt; Tue, 18 Apr 2000 08:17:32 +1000 (EST)
Received: from nose.cs.utoronto.ca ([128.100.20.218])
	by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with SMTP id IAA38973
	for <pups@minnie.cs.adfa.edu.au>; Tue, 18 Apr 2000 08:17:17 +1000 (EST)
From: norman@nose.cs.utoronto.ca
Message-Id: <200004172217.IAA38973@minnie.cs.adfa.edu.au>
Subject: Early file system layouts (was: Splitting / and /usr)
To: pups@minnie.cs.adfa.edu.au
Date: Sun, 16 Apr 2000 14:43:14 -0400
Sender: owner-pups@minnie.cs.adfa.edu.au
Precedence: bulk

Warren is right that even the First Edition manual says that init
mounts /usr, implying that /usr was a distinct file system even that
early.  It seems to me that the original question Greg forwarded
from the NetBSD list was also after when /usr/bin appeared, which
isn't necessarily the same date.

A possible answer from old manuals:

- Second Edition sh(I) (dated 3/15/72):
	If the first argument is the name of an executable file,
	it is invoked; otherwise the string "/bin/" is prepended
	to the argument.  (In this way the standard commands,
	which reside in "/bin", are found.)  If the "/bin" file
	exists, but is not executable, it is used by the shell
	as a command file.

- Third Edition sh(I) (dated 1/15/73):
	If the first argument is the name of an executable file,
	it is invoked; otherwise the string "/bin/" is prepended
	to the argument.  (In this way most standard commands,
	which reside in "/bin", are found.)  If no such command
	is found, the string "/usr" is further prepended (to give
	"/usr/bin/command") and another attempt is made to execute
	the resulting file.  (Certain "overflow" commands live in
	"/usr/bin".)  If the "/usr/bin" file exists, but is not
	executable, it is used by the shell as a command file.

Notice the odd detail that non-executable files in /bin (early on)
or /usr/bin (later) get special treatment.  Does this mean that
shell scripts that weren't in /usr/bin had to be invoked explicitly
via `sh script' instead of just `script'?

Even deeper historic trivia: it occurred to me to check the fragments
of the PDP-7 system I have on paper to see whether /usr existed then.
I was quickly reminded that it almost certainly didn't because subdirectories
weren't really used then; there were no pathnames in that system.
(You could open only files in the working directory, though you could
link from another directory.)  When asked to invoke `x', the shell first
tried to open `x', then to link `x' from directory `system' and open the
result.  (Presumably it remembered to remove the needless link after the
open, but I'm not quite certain; the old paper copy is missing a few
lines just there.)  So even the name `bin' doesn't date back quite to
the beginning.

Norman Wilson

