Webtmpwatch recursively removes files which haven't been accessed for a given time. Normally, it's used to clean up directories which are used for temporary holding space such as /tmp. When changing directories, tmpwatch is very sensitive to possible race conditions and will exit with an error if one is detected. Webtmpwatch recursively removes files which haven't been accessed for a given time. Normally, it's used to clean up directories which are used for temporary holding space such as /tmp. …
tmp删除不了-掘金 - 稀土掘金
WebJan 20, 2024 · tmpwatch (most RedHat distro) package will do. DESCRIPTION tmpwatch recursively removes files which haven’t been accessed for a given time. Normally, it’s used … WebOct 6, 2009 · Description Gerrit Slomma 2009-10-06 11:22:47 UTC Description of problem: tmpwatch is deleting /tmp/hsperfdata_$ {user} of started java-processes that are older than 10 days. jps and jstat are completely useless afterwards since all performance data is stored in a PID-named file in this folder. onb botox
shell - bad time argument filename in tmpwatch - Stack Overflow
WebJun 1, 2024 · Don't know which version first added this option; my (centos 6.6) man-page for tmpwatch 2.9.16 has: -X, --exclude-pattern=pattern Skip paths matching pattern; if a directory matches pattern, all files contained in it are skipped too. pattern must match an absolute path that contains no symbolic links. WebMay 29, 2015 · On RHEL 6.2 the files in /tmp are deleted by tmpwatch if they have not been accessed in 10 days. The file /etc/cron.daily/tmpwatch defines the way tmpwatch is called. #! /bin/sh 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_*' 10d /tmp WebSep 21, 2024 · yum install tmpwatch -y Once thats done you can run set up a cron job to regularly run tmpwatch. You can either manually edit the system cron file found at /var/spool/cron/root or execute the following via SSH. crontab -e paste the following at the very end of the file. 0 6 * * * /usr/sbin/tmpwatch -am 12 /tmp Now you need to save the file. onb boy