Date: Mon, 28 Dec 2009 00:22:37 +0000 From: Pegasus Mc Cleaft <ken@mthelicon.com> To: Doug Barton <dougb@freebsd.org>, jilles@stack.nl Cc: FreeBSD current mailing list <current@freebsd.org> Subject: Re: Clearing /var/tmp on boot Message-ID: <200912280022.38017.ken@mthelicon.com> In-Reply-To: <4B37E89D.1050703@FreeBSD.org> References: <200912272256.13436.ken@mthelicon.com> <4B37E89D.1050703@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 27 December 2009 23:07:09 Doug Barton wrote: > Pegasus Mc Cleaft wrote: > > Hello Current.. > > > > While checking over my system (9-CURRENT AMD64) I was a bit surprised to > > find tons of old files that were hanging around in my /var/tmp that were > > never deleted/cleaned out. Most of the offenders were dbus, KDE and PCSCD > > files. To be honest, I never really checked the /var/tmp directory as I > > normally use the /tmp for generic stuff (unpacking archives, etc). I was > > wondering if there should be a startup rc script that cleans this > > directory as well. > > <from Doug> > No, there should not. If you look at hier(7) it says this about > /var/tmp: temporary files that are kept between system reboots > > <from Jilles> >Like all temporary directories, it is a good idea to clean stale files >from /var/tmp, but hier(7) explicitly says that /var/tmp is not cleared >on reboot. In particular, nvi's recovery system puts files in >/var/tmp/vi.recover/ and assumes they will not be deleted by a reboot >(see /etc/rc.d/virecover). Thanks Doug and Jilles, I hadent thought about that and now that I see the man page, I understand. I think I will implement what Julles suggested and change the script in my /usr/local/etc/rc.d to clear out the files after some period of time so that really old (and hopefully useless) items are deleted. In my particular setup, it is rare that I do anything in vi, aside from quick config changes and wouldn't be to upset if the system crashed (or got a SIGHUP) in the middle of one and I lost the work in progress. It does make me wonder why some applications would choose to use a temp directory with persistence over reboots when you wouldn't think it would be necessary (like dbus) but I understand that this is not a FBSD issue. Thanks again for you advice, Peg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912280022.38017.ken>