Why do /usr and /tmp directories for Linux miss vowels in their spellings?

8,180

Solution 1

Yup there were reasons. They are pronounced user and temp. passwd is similar, as is resolv.conf. Unix is an expert friendly, user antagonistic operating system.

I was a student when 300 Baud modems were the norm. I was the envy of my fellow students, since I had a Silent 700 terminal from Control Data where I was working. You could see the delay from typing each character and waiting for it to be echoed. Every character counted; I also see it as fostering the start of leet speak.

The hjkl from vi have a history which few know. vi was developed by Bill Joy when he was a grad student at UCB during these same years. The ADM 3a terminals in Cory Hall had arrow keys above those letters

Solution 2

They are holdover from Unix. Memory and disk space was in short supply. Hacking out a few vowels and other abbreviations gave real savings. A few disk blocks or a few bytes could mean the difference in being able to run a program or not. (I once had to trim a program by 24 bytes before it would run.)

Also as Tom noted terminal speeds were slow. 1200 baud was introduced as high speed and it was. I worked with one system that used a half speed teletype (55 baud or 5 cps) as the console.

On systems running graphical interfaces it generally doesn't matter that much as the average users won't be poking around in them. The directories are usually well documented in the hier man page.

Changing over to longer names would cause a lot of problems for existing programs. It would also limit script portability. Linking multiple names to the same directories would likely be more confusing than helpful.

EDIT: PDP-7 on which Unix was developed had a base configuration of 4KW of memory and a maximum of 32KW. Words where 18 bits wide. Input was a teletype, so speed was likely 110 baud or 10cps, roughly 100 words which is significantly slower than speech.

Solution 3

I'm surprised that nobody has commented on /user yet. This one is obvious: because it's not "user", it's "Universal System Resources".

As for /tmp, it's simply shorter and easier to type. C programmers have a habit of using short names when possible because they end up typing them many times in a program. It is very common have a temporary variable named "tmp" rather than "temp" for the same reason, you use "i" i for the index in a for loop instead of "index" or "counter".

Solution 4

A factor that nobody has mentioned is that, given the keyboard technology of the time, there was a substantial advantage in using short names that are easier to type. Printing user vs. usr, even on a 110-BPS teletype, probably wasn't a huge deal; having to type that extra letter was probably more significant.

Solution 5

All the other directories under root seem to be exactly what one would guess them to be,

There is also /var, /mnt and /opt ;)

but these two seem odd, I would have always guessed them as user and temp.

Almost there. As Shawn said, "user" stands for "Universal System Resources" (though other resources according to the google indicates it stands for "Unix System Resources").

Is there some historical reason for the spellings?

Short cuts, abbreviations. Remember that commands in any operating system are meant for accessing both interactively and programmatically. In particular for systems administration where fast scripting is one primary concern, abbreviations, mnemonics are as good (or even better) than the full spelled word/command.

Also, back in the day, if you were connecting remotely through a slow-as-molasses modem, shaving a couple of vowels here and there would make your life easier (or less miserable if you were a sysadmin trying to find out what the hell is wrong with a remote box.)

As said before, it is not unique to /usr and /tmp (see /var, /mnt and /opt).

Also, it is not unique to Unix. Take DOS for example (chkdsk, for example.) Mnemonics where you shave off vowels are a powerful, handy concept.

Even in natural languages (like Semitic languages) the concept exists (where root of words are universally and almost unambiguously identified by 3-consonant groups.) It is an innate human mechanism for managing information.

Share:
8,180

Related videos on Youtube

Lazer
Author by

Lazer

Updated on September 17, 2022

Comments

  • Lazer
    Lazer over 1 year

    I have often started to think about this but never found a good answer. Why are these two Unix directories not /user and /temp instead?

    All the other directories under root seem to be exactly what one would guess them to be, but these two seem odd, I would have always guessed them as user and temp.

    Is there some historical reason for the spellings?

    • krick
      krick about 13 years
      Something tells me it's a carryover from Unix. On that assumption, I'd guess that most such truncations are based on prominent syllables.
    • mattdm
      mattdm about 13 years
      Once, Ken Thompson was asked if he'd do anything different were he redesigning Unix, and he replied ""I'd spell creat with an e."
    • phunehehe
      phunehehe about 13 years
      "All the other directories under root seem to be exactly what one would guess them to be" -> That doesn't seem true to me. Except for boot, home, media and root everything else is shortened. mnt also lack its vowels.
    • Mr. Shickadance
      Mr. Shickadance about 13 years
      I thought 'u' was a vowel...
    • 0xC0000022L
      0xC0000022L about 13 years
      @Mr. Shickadance: it is.
    • user unknown
      user unknown about 13 years
      I heared /usr stands for unix system ressources, not user. But I too heard that it is another myth. :) I don't have evidence.
    • Stein Åsmul
      Stein Åsmul almost 13 years
      Sounds like we need a book: "On the origin of Unix, a journey through dyslexia" :-).
    • vonbrand
      vonbrand about 11 years
      All the "directories with readable names" are much newer conventions in Unixland...
    • vonbrand
      vonbrand about 4 years
      The "other directories" you mention (/boot, /home, and so on) are much later additions, perhaps even introduced in some Linux distribution.
  • mattdm
    mattdm about 13 years
    I don't think that when it was designed the idea of being "expert friendly, user antagonistic" was part of the goal. Rather, all of the users were experts, so there was no meaningful distinction.
  • RykoS
    RykoS about 13 years
    LOL "Experty friendly, user antagonistic". It made my day. +1!
  • user unknown
    user unknown about 13 years
    I don't buy mmory nd dsk spc, but slow tltyps. As long s you cn dcphr th cronyms - why not?
  • Admin
    Admin about 13 years
    @user unknown: Then you are young and never had to worry about memory or disk space. My first computer is 30 years old now - marvel at the specs.
  • luis.espinal
    luis.espinal about 13 years
    Just a small note (not a correction by any means). Though it is sometimes pronounced "user", /usr stands for either "universal system resource" or "unix system resource". Whichever that is, it's been lost amid the fog of Unix's ancient history :)
  • jlliagre
    jlliagre about 13 years
    At the time /usr was coined, its meaning was user and home directories were located there. unix/universal system resource is actually a backronym.
  • jlliagre
    jlliagre about 13 years
    At the time /usr was coined, its meaning was user and home directories were located there. unix/universal system resource is actually a backronym.
  • Arcege
    Arcege about 13 years
    The /var, /mnt and /opt came MUCH later. However, /bin, /dev, and /etc were in very early UNIX and for the same reason people stated - because ttys were slow and not all were CRT and disk space. There were UNIX boot systems out there using paper tape, small (space-wise) expensive drives and even 8" floppies. Space for those were at a premium.
  • Shawn J. Goff
    Shawn J. Goff about 13 years
    @jlliagre Awesome. I found another thread that actually has an authoritative source of that. us.generation-nt.com/answer/…
  • user unknown
    user unknown about 13 years
    I have never written or inspected a filesystem in depth, but does the name of a file/directory in the filesystem occupy more or less space, depending on 1 character? The files themselves always occupy a multiple of some size - today 4k. So most files which contain a path to /usr or /tmp will not effectively get smaller or bigger, depending on a single e. Well - sometimes they will, and then they grow for a whole blocksize, but rarely. And in RAM? I don't know.
  • xenoterracide
    xenoterracide about 13 years
    and it would have been more annoying to type. "temporary vs tmp" ugh... why would anyone want them longer?
  • geekosaur
    geekosaur about 13 years
    Modern Unix directories have variable-length entries. Back in Research Unix, a directory entry was a fixed 16 bytes: 14 for the filename, 2 for the inode number. And it may have been smaller when /usr etc. were canonized.
  • BillThor
    BillThor about 13 years
    Most file systems store the file in blocks. Sizes range from 512 bytes on up in powers of 2. Available sized depend on the file system. Some filesystems will store the tail (partially filled last block) in the inode stucture. Occupied space may be more closely related to the number of bytes, than is found with systems that only use block level storage.
  • Tom Murphy
    Tom Murphy about 13 years
    Most early C programmers were first FORTRAN programmers. The way you typed integers in Fortran IV was to start the identifier with a character from 'i' to 'n', everything else was a REAL number. Thus loop indices were typically i, j, or k; which was sufficient for the matrices we scientific programmers were mangling back then.
  • Simon Gates
    Simon Gates over 12 years
    When Unix came out 300 bps was lush. There were 75 bps links out there, handled by cumbersome, slow, electromechanical teletypewriters (often Teletype® ASR-33).
  • vonbrand
    vonbrand about 11 years
    @TomMurphy, most people who started with C were probably assembly language programmers, or perhaps BCPL or B users. RATFOR was invented for the poor souls who didn't have a decent language at hand. And the Kernighan and Plaugher book "Software tools" was written in (and lists a full preprocessor for) RATFOR. Still very much worth a read.
  • ninjalj
    ninjalj over 10 years
    It could be argued that semitic languages don't actually use consonants, but syllables with indeterminate vowels. So, the root syllables provide semantic meaning, while the specific vowels add grammatical meaning.
  • AlexBrand
    AlexBrand over 7 years
    @luis.espinal Not true. Dennis Ritchie himself has said it was for user home directories on a slower disk. Although unfortunately the notes page where this is documented is no longer available on Bell Labs website nor was it archived on archive.org. :-( However his quote is found other places online.
  • user
    user about 7 years
    Related: Youtube: AT&T Archives: The UNIX Operating System (produced around 1982) where, at about 13min 35sec, /usr/bwk is clearly pronounced "user-b-w-k" and /usr is pronounced "slash-user" by Brian W. Kernighan. /usr is also clearly implied to be the location containing home directories in the diagram at 13min 30sec. I don't think you can get much more authoritative than that. // cc @luis.espinal
  • user
    user about 7 years
    /usr wasn't "Universal System Resources", it really was user. See Youtube: AT&T Archives: The UNIX Operating System (produced around 1982) where, at about 13min 35sec, /usr/bwk is clearly pronounced "user-b-w-k" and /usr is pronounced "slash-user" by Brian W. Kernighan. /usr is also clearly implied to be the location containing home directories in the diagram at 13min 30sec. I don't think you can get much more authoritative than that.
  • Osama khodroj
    Osama khodroj over 5 years
    @ShawnJ.Goff: ...aand it's gone.
  • Osama khodroj
    Osama khodroj over 5 years
  • Iain Collins
    Iain Collins over 5 years
    Just to add to this, there were/are limits on total length of a path in Unix, which I ran into a few times over the years, so that's a factor too. I agree it was almost certainly driven mostly by brevity in typing and space saving consideration though.