Hierarchaeology
(and other halfway forgotten things)
Back in the old days of Unix, things used to be a little different. While this may sound like I'm another one of those who like to dwell in the "good old times", that is not really the case. I have only encountered Unix (through Linux) in the late 00's of the ongoing century, so the best I can do is an archaeological approach—which incidentally makes it all the more interesting.
A few random things I've found (and a few myths and backronyms that I've found to be rather wrong):
-
/etc
really just means et cetera. The notion of "configuration files" didn't exist back then (one would have to recompile a program to change an aspect of its behaviour); this directory simply contained files that didn't fit elsewhere. Hell, eveninit
used to be in here. Configuration files were not specifically only in this location (there was no specification for them), and it was only when other things got gradually moved out and the only remaining thing seemed to be configuration files, that this directory began to be seen as the "configuration directory". Note, though, that even today, it is not exclusively configuration files in here. -
/sbin
originally just meant static binariesThis is no longer the case on Linux (probably never has been), and quite probably neither on BSD., as in: Binaries that do not rely on an external library and are thus ideal for being used in a limited environment (e.g. early boot). This made them useful for low-level system plumbing—this aspect somehow morphed into the perception thatsbin
contains "system administrator tools", and nowadays, it is "hidden" from normal users by not having it in$PATH
(and that separation causes issues more often than it solves any). -
/usr
originally just meant user. It was the mountpoint of a separate disk, and user data was moved here to keep the root filesystem from overfilling. Likewise, other files like manuals (man
), source files (src
), and "non-essential" binaries (bin
) and libraries (lib
) were moved into their equivalent under/usr
for the same reason. This left the "first disk" with the root filesystem only with the tools to bootstrap the system and mount/usr
. Note that these days, this is handled by the initial RAM disk, so the separation is pretty pointless. -
When
/usr
started filling up as well, user-personal data was moved to a third disk, mounted under/home
. Ironically, this left the original "user directory" as a location for non-user, system-wide data.
When GNU/Linux entered the scene (roughly 20 years later), that layout had already become semi-formalised. As a result, we now find ourselves in this legacy-loaded mess.
But hey, at least it is somewhat standardised! And there is a slow-but-steady
effort to improve the hierarchy: currently, the various bin
and lib
directories are being merged together (although, on
some distributions the arbitrary split between sbin
and bin
is still
retained).
Other old trivia that is not hierarchy- but still filesystem-related:
- Prepending dots to a filename to make that file "hidden" was an
accident. Back in the starting days of Unix,
ls
used to show all entries in a directory. All of them, even.
and..
for the current and parent directory. This was of course a bit redundant (every directory contains them), so the authors decided to add code tols
to hide those entries by default. But instead of ignoring.
and..
, they took a shortcut:ls
should simply ignore each entry that would start with a dot.
Elegant, heh?Actually, the originally intended behaviour eventually got implemented asls -A
.
The list is admittedly a bit short. I will extend this over time whenever I stumble over another trivia that I find interesting.
read more
2019
2017
- Hierarchaeology
- Sketches
- Epoch
- Shadows
- 日本語 in LATEX
- /var/log/computers
- Tufte CSS