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

linux 开机自动删除/tmp目录下的文件

2013-01-03 17:05 393 查看
linux 开机自动删除/tmp目录下的文件

1:  查看/etc/default/rcs文件:  cat  /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.

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
TMPTIME=0

# spawn sulogin during boot, continue normal boot if not used in 30 seconds

SULOGIN=no

# do not allow users to log in until the boot has completed

DELAYLOGIN=no

# assume that the BIOS clock is set to UTC time (recommended)

UTC=yes

# be more verbose during the boot process

VERBOSE=no

# automatically repair filesystems with inconsistencies during boot

FSCKFIX=no

注意红色部分的信息,即可明白

2、根据上述信息,修改 TMPTIME的值即可:

TMPTIME=-1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: