Recently started to learn Linux, about/tmp folder,
Check some information, the/tmp folder is a place to store Linux temporary files, the Linux system in the/tmp folder files will be emptied, as to how long to be emptied, how to empty, may not be clear.
In CentOS5.11, you can use the/etc/cron.daily/tmpwatch command to clean the/tmp folder
[Email protected] ~]# Cat/etc/cron.daily/tmpwatch
Flags=-umc
/usr/sbin/tmpwatch "$flags"-x/tmp/. X11-unix-x/tmp/. Xim-unix \
-x/tmp/.font-unix-x/tmp/. Ice-unix-x/tmp/. Test-unix \
-X '/tmp/hsperfdata_* ' 240/tmp
/usr/sbin/tmpwatch "$flags" 720/var/tmp
For D In/var/{cache/man,catman}/{cat?,x11r6/cat?,local/cat?}; Do
If [-D "$d"]; Then
/usr/sbin/tmpwatch "$flags"-F 720 "$d"
Fi
Done
The first line of the script is equivalent to a tag (parameter), the second line is for the/tmp directory in the excluded directory, the third row, this is the/tmp directory cleanup, the following is for the other directory cleanup.
This article is from the "KKMM" blog, make sure to keep this source http://lisiyun.blog.51cto.com/2779132/1671267
Learn Linux primer,/tmp folder