35

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?

9
  • 2
    Something tells me it's a carryover from Unix. On that assumption, I'd guess that most such truncations are based on prominent syllables.
    – Ken
    Mar 6, 2011 at 6:32
  • 19
    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."
    – mattdm
    Mar 6, 2011 at 7:08
  • 3
    "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.
    – phunehehe
    Mar 6, 2011 at 9:32
  • 7
    I thought 'u' was a vowel... Mar 6, 2011 at 16:04
  • 1
    @Mr. Shickadance: it is. Mar 7, 2011 at 11:49

5 Answers 5

49

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

7
  • 23
    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.
    – mattdm
    Mar 6, 2011 at 7:16
  • 7
    LOL "Experty friendly, user antagonistic". It made my day. +1!
    – nico
    Mar 6, 2011 at 9:21
  • 6
    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 :) Mar 6, 2011 at 14:06
  • 22
    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
    Mar 6, 2011 at 14:32
  • 3
    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).
    – Alexios
    Jan 12, 2012 at 16:03
21

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.

7
  • 8
    I don't buy mmory nd dsk spc, but slow tltyps. As long s you cn dcphr th cronyms - why not? Mar 6, 2011 at 10:47
  • @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.
    – user591
    Mar 6, 2011 at 13:47
  • 1
    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. Mar 7, 2011 at 1:05
  • 1
    and it would have been more annoying to type. "temporary vs tmp" ugh... why would anyone want them longer? Mar 7, 2011 at 2:20
  • 4
    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.
    – geekosaur
    Mar 7, 2011 at 8:38
6

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.

1
  • My impression, from learning Unix in the mid-1970s, was that most Unix (and C) developers did not have really strong or fast typing skills. So short (abbreviated) command names (and reserved language words) were favored. Also, I'm sure that as the systems were originally developed, there were not that many commands or directories (or users!), and so longer names were not really needed, to clearly differentiate things.
    – Jeff Grigg
    Apr 18 at 11:54
5

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".

7
  • 24
    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
    Mar 6, 2011 at 14:33
  • 4
    @jlliagre Awesome. I found another thread that actually has an authoritative source of that. us.generation-nt.com/answer/… Mar 6, 2011 at 16:01
  • 2
    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.
    – Tom Murphy
    Apr 5, 2011 at 5:56
  • @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.
    – vonbrand
    Mar 18, 2013 at 17:09
  • 3
    /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.
    – user
    Apr 22, 2017 at 12:09
1

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.

2
  • 1
    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.
    – Arcege
    Mar 6, 2011 at 15:31
  • 1
    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.
    – ninjalj
    Dec 2, 2013 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .