您的位置:首页 > 运维架构 > Linux

Linux系统下/tmp目录文件重启后自动删除

2013-11-04 01:17 323 查看
经常会把临时性的log或抓包等文件放在/tmp目录下,重启后发现文件都丢失了。查下资料发现,可以通过设置解决这个问题。
在/etc/default/目录下有个rcS文件,文件内容如下:
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=no
RAMRUN=no
RAMLOCK=no

红色字体TMPTIME=0。值为0表示重启后删除文件,值为-1就不会自动删除文件,职位正整数表示/tmp目录下文件保留时间。


转载至 http://blog.chinaunix.net/uid-26212859-id-3567875.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: