[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to enable Debian to automatically clear the tmp directory



On Thu, Aug 28, 2008 at 12:05:08PM -0500, Stackpole, Chris wrote:
> I second the cronjob. Just have something along the lines of:
> find /tmp -type f -ctime +1

    mtime or atime.  ctime has no bearing on whether the files are still in
use.  mtime is not perfect but will show if a file has been update recently.
Recently modified files would be files in use regardless of their age since
creation.  atime would be best since it shows when the file was last accessed.
One could surmise that access files are in use.  However atime can be turned
off on a per-filesystem basis and, to be honest, I am a tad fuzzy if a stat()
call constitutes an access.  I don't believe it is but it would be humorous if
it were.  ;)

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 1FC01004       | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------

Attachment: signature.asc
Description: Digital signature


Reply to: