From owner-freebsd-questions Wed Sep 18 5:57:24 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57EDF37B401 for ; Wed, 18 Sep 2002 05:57:23 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id E817143E4A for ; Wed, 18 Sep 2002 05:57:21 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk ([IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g8ICvKc9083057; Wed, 18 Sep 2002 13:57:20 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g8ICvFQV083054; Wed, 18 Sep 2002 13:57:15 +0100 (BST) Date: Wed, 18 Sep 2002 13:57:15 +0100 From: Matthew Seaman To: John Bolster Cc: "Freebsd-Questions@Freebsd. Org" Subject: Re: mailchk.026233 Message-ID: <20020918125715.GB82815@happy-idiot-talk.infracaninophi> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-3.4 required=5.0 tests=IN_REP_TO version=2.31 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Sep 17, 2002 at 05:22:39PM -0400, John Bolster wrote: > I've found hundreds of files with names like mailchk.xxxxxx in my /tmp > directory. This is FreeBSD 4.1 RELEASE, the server runs the UW IMAP server > and Squirrelmail. Does anyone know if these files can be safely deleted? > > Also, in /var/tmp there are hundreds of phpxxxxxx files. Same question. The answer is "probably yes". Those files are temporary storage used by various programs to cache some data in, and maybe hand it over to some other process for dealing with. The program will typically use each one once and then open up a new file the next time it needs that sort of thing. (Hence the numbers to ensure unique temporary file names). Well behaved programs will delete the files once they've finished using them. Cunning programs will use the mkstemp(3) call to get a unique filename and open the file in one fell swoop. Really cunning programs will do that, and unlink the files *before* they've used them, just keeping the open file descriptor to access their temporary space. Use the fstat(1) command to see if any processes have the files open. If not, try deleting some of them. If there are no howls of protest from your user base, I'd say you're probably OK to clean out those directories. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message