Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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

  2. #2
    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

    #vi /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

  3. #3
    by default, yes

    take a look into your /etc/crontab and you should see something like this:

    # run-parts
    01 * * * * root run-parts /etc/cron.hourly
    02 4 * * * root run-parts /etc/cron.daily
    22 4 * * 0 root run-parts /etc/cron.weekly
    42 4 1 * * root run-parts /etc/cron.monthly

    there it goes....

    good luck

  4. $spacer_open
  5. #4
    thx reply , is it default setting of RH system ? and how can I disable it ?

    what is mean of "240" , is it mean 240 days ?
    /usr/sbin/tmpwatch 240 /tmp


  6. #5
    Are you saving files in tmp, This you should not do, Are you doing this as root or a normal user, use the users home dir to store files and /tmp is for temorary system files its a volitile place ment for temporary access by the system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts