LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   the file in the path /tmp is lost (https://www.linuxquestions.org/questions/linux-general-1/the-file-in-the-path-tmp-is-lost-293628/)

ust 02-22-2005 08:02 PM

the file in the path /tmp is lost
 
I found that in my rh system , the file in the path /tmp seems have been removed in a certain interval of time ( eg. two weeks ) , so always can't find the file that over 2 weeks , I have checked no cron job will remove the file , could suggest how can I check the reason , is it because any function / service has been enabled ? thx

btmiller 02-22-2005 08:04 PM

Have you rebooted in that time? Some distros nuke /tmp on reboot but not while the system is running. Otherwise check root's crontab and the /etc/crontab file (as well as cron.daily, cron.weekly, etc.) for the offender. There's a program called tmpwatch that does this sort of thing.

ust 02-22-2005 08:38 PM

thx reply , i found a tmpwatch as below , but is not added to the crontab ( I can't see it by crontab -e ) , is the below job run as schedule ? is it the reason why my file in /tmp is lost ? please advise

ll /etc/cron.daily/tmpwatch

/usr/sbin/tmpwatch 240 /tmp
/usr/sbin/tmpwatch 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch -f 720 $d
fi
done


All times are GMT -5. The time now is 02:36 PM.