Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
Temporary files: RAM or disk?
Posted Jun 5, 2012 12:34 UTC (Tue) by roblucid (subscriber, #48964)
There was even debate in openSUSE's FATE, when it was proposed to default to the FHS behaviour and delete /tmp files by default (due to misfeature of old SuSE Linux automatic deletion needed to be explicitly turned on, which caused maintenance issues as developers who "knew" /tmp is automatically cleaned out, wouldn't ensure cleanup on process crashes and so on).
Posted Jun 5, 2012 15:40 UTC (Tue) by nybble41 (subscriber, #55106)
The distinction which I learned, which may very well be non-universal, was that /tmp is for temporary files which are tied to a particular process. These files can be removed as soon as the process exits, including on reboot. The /var/tmp directory is for temporary files which may need to outlast a given process, possibly across reboots, and should thus be cleared out much more sparingly based on the ages of the files.
Of course, not all processes follow this distinction.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds