[NTLUG:Discuss] Persistence in /tmp

Rick Cook rick at rickcook.name
Mon May 4 23:22:10 CDT 2009


On Monday 04 May 2009 22:24:17 Chris Cox wrote:
> On Tue, 2009-05-05 at 08:20 -0500, Leroy Tennison wrote:
> > I noticed today that some things I had downloaded days (or months)
> > ago continued to exist in /tmp as well as other miscellaneous files. 
> > There were a number of PPD files but also downloaded documents,
> > directories (empty and not) and socket files.  Most were deletable
> > but some (even with "old" dates) weren't.
> >
> > I was previously under the impression that /tmp was truly temporary
> > (cleaned up @ shutdown or restart).  Is that an incorrect
> > understanding or am I seeing the results of program bugs in the
> > non-current files and directories?
>
> It is a misunderstanding.  The idea is that /tmp CAN get cleaned out
> on a regular basis, but technically, it doesn't even have to cleaned
> out upon reboot.  So... you can't assume that /tmp gets cleared.
>

Several distributions have configuration settings that allow you to set 
the /tmp and /var/tmp "clearing policy".

For instance, in Debian, you can set a "maximum age" for files in /tmp in 
the file "/etc/default/rcS".


Rick


More information about the Discuss mailing list