Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: harris-g@cox.net (Harris)
Subject: Re: When does /tmp empty?
Date: 16 Jan 2003 10:21:43 -0800	[thread overview]
Message-ID: <4efc65f8.0301161021.590c5c3b@posting.google.com> (raw)
In-Reply-To: 3E23AF22.6080708@ev.co.yu

Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu> wrote in message news:<3E23AF22.6080708@ev.co.yu>...
> Paul Szabo wrote:
> > Chris Hendrick wrote:
> > 
> >>I have gathered from other posts on this group that /tmp empties on
> >>boot in v5.1a.  Is this true or are there other, automated instances?
> > 
> > 
> > At boot it runs /sbin/init.d/rmtmpfiles . I guess there is something in
> > default root crontab, but I use my own cleantmp script: see
> 
> System cannot know for sure if a file in /tmp is "dead", unless it is 
> boot/reboot (so, no process could have survived). The reason for preserving 
> files newer than 3 days is for preserving some possible output for the 
> user/admin to look at.
> 
> Another possibility would be to scan each file in /tmp with "fuser" command and 
> if it is not used AND older than, say, 5 days, then delete it.
> 
> Nix.

Also, there should be entries in the root crontab that call /usr/sbin/dirclean
that purge old entries in /tmp and /var/tmp...The entries would be something like:

   20 4 * * * /usr/sbin/dirclean -t +2 -o -k s /tmp/
   30 4 * * * /usr/sbin/dirclean -t +7 -o -k s /var/tmp/

Harris


      reply	other threads:[~2003-01-16 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-13 15:16 When does /tmp empty? Chris Hendrick
2003-01-13 19:52 ` Paul Szabo
2003-01-14  6:33   ` Nikola Milutinovic
2003-01-16 18:21     ` Harris [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox