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
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
相关文章推荐
- Linux--/tmp目录文件重启后自动删除
- Linux系统下/tmp目录文件重启后自动删除
- Linux下tmp文件夹的文件自动删除的问题(转)
- Linux的tmp目录会自动清理文件
- linux 开机自动清空/tmp目录是怎么回事
- linux下面自动打包备份并且删除5 天前的文件
- linux中,只删除目录下的文件,不删除目录下的目录。
- Linux下面删除指定目录下非指定文件的所有文件
- Linux下面如何拷贝和删除隐藏的目录和文件
- Linux 自动删除N天前的文件
- linux下遍历目录和文件,删除过期天数目录或文件shell脚本
- Linux 文件和目录管理之列出、删除、复制、移动及改名
- Linux计划任务,自动删除n天前的旧文件
- 已知/tmp目录下已经存在了test.txt文件,如何执行命令才能把/mnt/test.txt拷贝到/tmp下覆盖掉/tmp/test.txt,而让linux系统不提示是否覆盖(root权限下)
- linux 下实现文件与目录删除
- linux rm命令参数及用法详解---linux删除文件或目录命令
- CentOS Linux自动备份文件到远程FTP服务器并删除指定日期前的备份Shell脚本
- linux面试题:删除一个目录下的所有文件,但保留一个指定文件
- Linux系统自动删除文件(web项目删除日志)
- 在Linux系统下递归删除文件或目录的方法