From owner-freebsd-current@FreeBSD.ORG Mon Dec 28 00:22:45 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E69E106566B; Mon, 28 Dec 2009 00:22:45 +0000 (UTC) (envelope-from ken@mthelicon.com) Received: from hercules.mthelicon.com (hercules.mthelicon.com [IPv6:2001:49f0:2023::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFD78FC08; Mon, 28 Dec 2009 00:22:45 +0000 (UTC) Received: from feathers.peganest.com (feathers.peganest.com [78.33.110.3]) (authenticated bits=0) by hercules.mthelicon.com (8.14.3/8.14.3) with ESMTP id nBS0McEX020795 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Mon, 28 Dec 2009 00:22:39 GMT (envelope-from ken@mthelicon.com) From: Pegasus Mc Cleaft Organization: Feathers To: Doug Barton , jilles@stack.nl Date: Mon, 28 Dec 2009 00:22:37 +0000 User-Agent: KMail/1.12.4 (FreeBSD/9.0-CURRENT; KDE/4.3.4; amd64; ; ) References: <200912272256.13436.ken@mthelicon.com> <4B37E89D.1050703@FreeBSD.org> In-Reply-To: <4B37E89D.1050703@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912280022.38017.ken@mthelicon.com> X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hercules.mthelicon.com Cc: FreeBSD current mailing list Subject: Re: Clearing /var/tmp on boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2009 00:22:45 -0000 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. > > > No, there should not. If you look at hier(7) it says this about > /var/tmp: temporary files that are kept between system reboots > > >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