Early file system layouts (was: Splitting / and /usr)
norman at nose.cs.utoronto.ca
norman at nose.cs.utoronto.ca
Mon Apr 17 04:43:14 AEST 2000
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
Received: (from major at localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id KAA39649
for pups-liszt; Tue, 18 Apr 2000 10:10:53 +1000 (EST)
More information about the TUHS
mailing list