summaryrefslogtreecommitdiffstats
path: root/etc/daily
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-06-22 13:05:20 +0000
committerjoerg <joerg@FreeBSD.org>1996-06-22 13:05:20 +0000
commitf922895864188c2cf56283cde36655ca8200dbfe (patch)
tree4546e96ce025c0d34f046f85decfda33b10f1dcc /etc/daily
parentfac2ce3b1236438834d415410078fc73bacc4fcd (diff)
downloadFreeBSD-src-f922895864188c2cf56283cde36655ca8200dbfe.zip
FreeBSD-src-f922895864188c2cf56283cde36655ca8200dbfe.tar.gz
Add a few hints about the cleaning policy of /tmp, including an example
(commented out) for how to purge it regularly.
Diffstat (limited to 'etc/daily')
-rw-r--r--etc/daily24
1 files changed, 24 insertions, 0 deletions
diff --git a/etc/daily b/etc/daily
index 423063e..25cc17e 100644
--- a/etc/daily
+++ b/etc/daily
@@ -30,6 +30,30 @@ cd /tmp
# -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
# -a -atime +3 -exec rm -f -- {} \;
#
+#
+# The same security hole. Purge the temp directories from unused stuff.
+# Note that we must not accidentally clean the X11 lock files.
+#
+# Use at your own risk, but for a long-living system, this might come
+# more useful than the boot-time cleaning of /tmp. If /var/tmp and
+# /tmp are symlinked together, only one of the below will actually
+# run.
+#
+# if [ -d /tmp ]; then
+# cd /tmp && {
+# find . -type f -atime +3 -ctime +3 ! -name '.X*-lock' -exec rm -f -- {} \;
+# find -d . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
+# >/dev/null 2>&1; }
+# fi
+#
+# if [ -d /var/tmp ]; then
+# cd /var/tmp && {
+# find . ! -name . -atime +7 -ctime +3 -exec rm -f -- {} \;
+# find -d . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
+# >/dev/null 2>&1; }
+# fi
+#
+#
# remove system messages older than 21 days
msgs -c
OpenPOWER on IntegriCloud