經常會把臨時性的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