0
Thanks

A few words of thanks would be greatly appreciated.

Linux - Difference between /tmp and /var/tmp




Intro


The /tmp and /var/tmp directories are both used to store temporary files, but their use is slightly different.

The differences

  • When a program writes temporary files in /tmp, don't expect to find it at the launch of another program..
  • Indeed this directory can be cleaned out anytime. In the vast majority of distributions, this directory is cleaned at each reboot.


However, the files written to /var/tmp will be kept after restart.

Thanks to sebsauvage for this tip.
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Linux - Difference between /tmp and /var/tmp », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

0 Comments