Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Can you put files in /tmp? A friend of mine was telling me never to do that, it could bring down a machine. Is this true?

share|improve this question
up vote 2 down vote accepted

Depends. If it's actually a temporary file that's fine.

There are two situations where it might bring a machine down (or at least impair operation):

  1. There's no limit on it and you fill the root disk. This is even more of a problem if /var is the same slice/partition.

  2. It's RAM and there's no limit so you use up all of the RAM on the machine.

But in general, the point is as a place for users to store temporary files (i.e. ones that may be deleted by the administrator or will disappear if the machine reboots).

share|improve this answer

It's what it's there for. The only potential problem is if you run out of space. You should be aware that the contents are generally not preserved across reboots.

share|improve this answer

If you're writing software for a multi-user system, make sure you create temp files securely. If writing shell scripts, the mktemp utility does this easily.

share|improve this answer

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.