码迷,mamicode.com
首页 > 其他好文 > 详细

/tmp 和 /var/tmp 的区别

时间:2016-09-19 01:07:37      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:

/tmp is meant as fast (possibly small) storage with a short time to live (TTL). Many systems clean /tmp very fast - on some systems it is even mounted as RAM-disk. /var/tmp is normally located on a physical disk, is larger and can hold temporary files for a longer time. Some systems also clean /var/tmp - but with a longer TTL.

Also note that /var/tmp might not be avaiable in the early boot-process, as /var and/or /var/tmp may be mountpoints. Thus it is a little bit comparable to the difference between /binand /usr/bin. The first is available during early boot - the later after the system has mounted everything. So most boot-scripts will use /tmp and not /var/tmp for temporary files.

Another (upcoming) location on Linux for temporary files is /dev/shm.

/tmp 和 /var/tmp 的区别

标签:

原文地址:http://www.cnblogs.com/drizzlewithwind/p/5865801.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!