cleaning up /tmp (was Re: files recovery after rm?)
Perry Hutchison
perry at ccssrv.UUCP
Sat Nov 11 13:14:00 AEST 1989
In article <20551 at unix.cis.pitt.edu> yahoo at unix.cis.pitt.edu (Kenneth L Moore)
writes:
>This should be addressed by the systems people. I would think that a
>program to clean /tmp on an as needed basis would be appropriate.
>I have logged in a week after writing to /tmp and found files still there.
SunOS, and probably others, clean /tmp on a reboot. That is the only time
when a complete cleanout is known to be safe without a lot of checking.
It is certainly possible, and probably advisable, to have a script which
removes anything in /tmp which has not been {accessed|modified} (pick one)
in, say, a week. Such a script can be run by cron in the wee hours.
Before you ask the obvious followup questions, read the man pages for find(1)
and cron(8).
More information about the Comp.unix.questions
mailing list