Another reason why - really /tm

Dave Martindale dave at onfcanim.UUCP
Sat Sep 28 00:47:36 AEST 1985


In article <13700108 at uiucdcs> acheng at uiucdcs.CS.UIUC.EDU writes:
>
>The "rm -r" may remove the lost+found directory in /tmp.  That
>may cause trouble when fsck needs it.  But then, one may say /tmp
>is for scratch and no big deal if files get lost there.  Well...

Note that /tmp contains a lost+found directory only if it is a separate
filesystem.

However, if you do delete lost+found, and then the system crashes, and
fsck finds an unattached file in /tmp and no lost+found directory to
link it into, fsck and the entire automatic reboot will fail.  Do you
really want to get phoned at 7AM because the system didn't come back
up by itself?

One solution is to do a newfs on /tmp every boot.

A better one is to not touch /tmp at all at boot time, but use a find
run from the crontab to clean it up.  This way, when the system recovers
from a crash, the temp files are still there.  There are few things more
annoying than logging in after a crash and having a mail message from
ex/vi telling you that it carefully preserved the info allowing you to
reconstruct your editing of /tmp/Re121345 or /tmp/article188 when, in fact,
the boot removed the originals.  It's pretty easy to set up a find that
deletes files that haven't been accessed in so many days, and any directories
*except* lost+found that haven't been accessed recently.



More information about the Comp.unix.wizards mailing list