Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1441253
  • 博文数量: 165
  • 博客积分: 2068
  • 博客等级: 上尉
  • 技术积分: 2102
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-27 16:07
文章分类

全部博文(165)

文章存档

2018年(1)

2017年(22)

2016年(9)

2015年(22)

2014年(8)

2013年(25)

2012年(53)

2011年(25)

分类: LINUX

2013-04-07 10:05:09

经常会把临时性的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目录下文件保留时间
阅读(15126) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~