*BSD News Article 71506


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!olivea!quack!quack.kfu.com!nsayer
From: nsayer@quack.kfu.com (Nick Sayer)
Subject: Re: MFS - Why?
Message-ID: <nrOhw02@quack.kfu.com>
Sender: news@quack.kfu.com (0000-News(0000))
Organization: The Duck Pond public unix, +1 408 249 9630, log in as guest.
References: <AEn4jRr0u3@qsar.chem.msu.su> <npX7tgO@quack.kfu.com> <4po5am$6hc@news.zipnet.net> <Dt536J.MEK@info.elvisti.kiev.ua> <4q82lv$bs@anorak.coverform.lan>
Date: Wed, 19 Jun 1996 20:45:15 UTC
Lines: 32

The traditional reasoning goes like this:

In the begining there was /tmp/ and /usr/tmp/. The point behind
the two separate ones was that /tmp/ was cleaned out at reboot time, and
/var/tmp/ was not. So if you needed a temp file to survive a reboot
(like a vi session file), you put it in /usr/tmp/, but if you were going
to create temp files that a reboot would cause you to _FORGET_ to remove
(as is the case when you do something like mktemp() or in the shell
you made a temp filename containing $$), you put them in /tmp/.

When the dickless (diskless) client was invented, they moved all of the
stuff that was in /usr/ at the time that needed to be writable on a
per-client basis to a new place called /var/. So /usr/spool now became
/var/spool. /usr/tmp/ became /var/tmp/. All of the old places in /usr/
were left behind only as symlinks. This way /usr/ was read-mostly (you
could even mount it read only if you never built a kernel) on the
clients and had no per-client localizations. You had one copy of /usr
for the whole group and one root partition and swap file per client.

That's where /var/tmp/ came from. It is what once was /usr/tmp/ before
the invention of the DL client. /usr/tmp/ and /tmp/ existed because they
had different treatment during a reboot.

It is sensible to keep /var/tmp/ and /tmp/ separate so they can be
treated differently. It is also sensible to keep the symlink going
from /usr/tmp/ to /var/tmp/.

-- 
Nick Sayer <nsayer@quack.kfu.com>  | Anita Hill then, Paula Jones now.
N6QQQ @ N0ARY.#NORCAL.CA.USA.NOAM  | 
+1 408 249 9630, log in as 'guest' | What goes around, comes around.
URL: http://www.kfu.com/~nsayer/   |