Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use centOS5, but these files of /tmp is deleted automatically when time passes. What kind of structure will this kill him in? In addition, How to stop this?

share|improve this question
The whole point of /tmp is for files to be there temporarily. Otherwise it will fill up! – Eddie Jun 11 '09 at 4:34
up vote 8 down vote accepted

If you have tmpwatch installed

# rpm -qa | grep tmpwatch

Then that will be clearing your /tmp regularly (it is called tmp for a reason)

tmpwatch is run from cron on a daily basis, check out /etc/cron.daily/tmpwatch

share|improve this answer

The best thing to do is ask yourself why you are storing long-lived files in /tmp in the first place. And then change the way you work so that it doesn't happen.

/tmp (tmp is short for temporary) is designed for short-lived (scratch) files which are created, used and deleted in a short period of time. It can also hold some sockets which are re-created every boot (X11 does this). I think most backup software will skip /tmp by default, too.

If you have an application that insists on keeping anything other than scratch files in /tmp, file a bug report.

share|improve this answer
This reminds me of the Windows user who was storing files he wanted to keep in his recycle bin (true story)! – Le Comte du Merde-fou Jun 11 '09 at 8:28
Yes, I heard that story. I also remember reading a forum thread where someone kept his emails in his mail client's trash folder. – pgs Jun 11 '09 at 8:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.