[ILUG] /tmp not cleared on reboot

Rick Moen rick at linuxmafia.com
Wed Nov 29 22:10:21 GMT 2006


Quoting Walter Faleiro (curtorkar at gmail.com):

> Thanks Rick,
> My distro is
> cat /etc/issue
> Red Hat Enterprise Linux WS release 3 (Taroon Update 1)
> Kernel \r on an \m

I realise this isn't your immediate problem, but you should upgrade that
to Update 6 with all possible speed, if only on account of security
patches.  (Also, although RHEL3 hasn't been EOLed yet, the writing's
definitely on the wall, so I hope you have a migration plan to RHEL4/5.)

> I got that for Debian on googling, but am trying to fix it for Redhat
> systems. I understand tmpwatch is supposed to clear things up.

Yes, /etc/cron.daily/tmpwatch, on RHEL3 systems.

> I can have a script like find /tmp -type f -mtime +7 exec { rm -rf } \;
> and have files that are older than 7 days removed.
> 
> My reason for posting this was that by default Redhat clears /tmp on
> reboot.

Well, I vaguely recall that RHL _used_ to do that, too -- but I'm
reasonably certain that RHEL3 drops that behaviour by default.  You can
certainly add it back via /etc/rc.d/rc.local, though, if you wish.




More information about the ILUG mailing list