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

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 featureTMPTIME=0# spawn sulogin during boot, continue normal boot if not used in 30 secondsSULOGIN=no# do not allow users to log in until the boot has completedDELAYLOGIN=no# assume that the BIOS clock is set to UTC time (recommended)UTC=yes# be more verbose during the boot processVERBOSE=no# automatically repair filesystems with inconsistencies during bootFSCKFIX=no

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

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

TMPTIME=-1

也许叔本华是对的,人与人的距离太远会寂寞到寒冷,

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

相关文章:

你感兴趣的文章:

标签云: