On Sat, Jul 01, 2006 at 07:40:33PM +0100, Craig Skinner wrote: > On Sat, Jul 01, 2006 at 07:40:18PM +0200, Paul de Weerd wrote: > > | I always symlink /var/tmp to my /tmp partition and mount /tmp with: > > | nodev,noexec,nosuid,noatime,async - as it gets wiped at boot anyway. > > > > Not only at boot, see daily(8) : > > > > - Removes scratch and junk files from /tmp and /var/tmp. > > > > But anyway, /var/tmp is meant to be the temporary storage area that > > *survives* reboots, it's actually used for this purpose, it's where vi > > stores its recovery files. If you ever reboot your machine when a > > stubborn user has ignored the warnings (perhaps wasn't at his terminal > > at that time) shutdown(8) sends out, he'll be able to recover his very > > important document if /var/tmp is not wiped at boot. > > Nope. I maybe just a stupid list lurking user, but I did read /etc/daily > and it performs similar sanity checks on /tmp as to what it wipes.
Yes, but /etc/rc doesn't: # prune quickly with one rm, then use find to clean up /tmp/[lq]* # (not needed with mfs /tmp, but doesn't hurt there...) (cd /tmp && rm -rf [a-km-pr-zA-Z]* && find . ! -name . ! -name lost+found ! -name quota.user \ ! -name quota.group -execdir rm -rf -- {} \; -type d -prune) You are right that a /tmp-based vi.recover wouldn't be wiped out by /etc/daily, which is interesting as I hadn't thought about that possible problem yet, but a reboot will still kill your vi(1) files. > If vi is an '80's song, it would be singing "I will survive!" > > And of course I use vim, what else is there????? vi(1) is pretty usable. And, according to an Undeadly poll, while vi-variants lead, Emacs is also quite popular - as well as simpler editors (joe, nano, ...). I use vim myself, and it doesn't use /var/tmp/vi.recover so at least that problem won't occur if you are the only user and use vim. Joachim