/tmp 和 /var/tmp 的区别
Posted RainDream
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了/tmp 和 /var/tmp 的区别相关的知识,希望对你有一定的参考价值。
/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 /bin
and /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 的区别的主要内容,如果未能解决你的问题,请参考以下文章
/var/tmp/rpm-tmp.ajKra4 (%prep) 的错误退出状态
tmp/.oracle,/var/tmp/.oracle如果删除了,该怎么办