From owner-freebsd-current@FreeBSD.ORG Tue Dec 29 02:34:14 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 0ACF11065693 for ; Tue, 29 Dec 2009 02:34:14 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from smtp7.server.rpi.edu (smtp7.server.rpi.edu [128.113.2.227]) by mx1.freebsd.org (Postfix) with ESMTP id 850F18FC1D for ; Tue, 29 Dec 2009 02:34:13 +0000 (UTC) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp7.server.rpi.edu (8.13.1/8.13.1) with ESMTP id nBT1LmBD003484; Mon, 28 Dec 2009 20:21:49 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <200912272256.13436.ken@mthelicon.com> References: <200912272256.13436.ken@mthelicon.com> Date: Mon, 28 Dec 2009 20:21:47 -0500 To: Pegasus Mc Cleaft , FreeBSD current mailing list From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Bayes-Prob: 0.0001 (Score 0) X-RPI-SA-Score: 0.00 () [Hold at 20.00] 22490(-25) X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.227 Cc: 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: Tue, 29 Dec 2009 02:34:14 -0000 At 10:56 PM +0000 12/27/09, Pegasus Mc Cleaft wrote: > > Should the /var/tmp directory be cleaned on bootup? To me, it >looked like it should as many of the files in the KDE directory were >partial download files many months old. As others have already noted, you wouldn't want to blindly remove everything in /var/tmp on reboot. I've been saved several times by something left in /var/tmp, so I'd be even a bit more paranoid about removing things than other people have suggested. I wouldn't remove things based on last-modification time, since you may have some important backup files there which have much older last-modification times. You could also get royally screwed up if you happen to have some kind of error with the time- of-day clock. (I've had machines which might boot up with the wrong time after they had been powered off for awhile, or if rebooting between OS's). What I'd suggest is to create a sub-directory under /var/tmp using some good naming convention based on the time of day at time of reboot. And then select files based on whatever criteria you want, and MOVE them into the sub-directory that you've created. Then at some later time you could remove that sub-directory if you know you've been up for awhile and you haven't had any need for any of those files. I realize this may seem like overkill, but every five or ten years that extra step may save you from a lot of grief! -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu