|
@ -1,6 +1,6 @@ |
|
|
#!/bin/sh - |
|
|
#!/bin/sh - |
|
|
# |
|
|
# |
|
|
# $OpenBSD: daily,v 1.6 1996/06/17 09:09:39 deraadt Exp $ |
|
|
|
|
|
|
|
|
# $OpenBSD: daily,v 1.7 1996/07/12 21:34:47 deraadt Exp $ |
|
|
# |
|
|
# |
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local |
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local |
|
|
host=`hostname -s` |
|
|
host=`hostname -s` |
|
@ -44,13 +44,14 @@ echo "Removing scratch and junk files:" |
|
|
# find . ! -name . -mtime +7 -exec rm -f -- {} \; ; } |
|
|
# find . ! -name . -mtime +7 -exec rm -f -- {} \; ; } |
|
|
#fi |
|
|
#fi |
|
|
|
|
|
|
|
|
# XXX NOT REMOVING UNTIL SECURITY BUG IS FIXED |
|
|
|
|
|
#cd /tmp |
|
|
|
|
|
#TMP=daily.$$ |
|
|
|
|
|
#find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \ |
|
|
|
|
|
# -o -fstype kernfs -o -fstype procfs \) -a -prune -o \ |
|
|
|
|
|
# -name 'lost+found' -a -prune -o \ |
|
|
|
|
|
# -name '*.core' -a -print -o \ |
|
|
|
|
|
|
|
|
cd /tmp |
|
|
|
|
|
TMP=daily.$$ |
|
|
|
|
|
rm -f $TMP |
|
|
|
|
|
echo -n > $TMP |
|
|
|
|
|
find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \ |
|
|
|
|
|
-o -fstype kernfs -o -fstype procfs \) -a -prune -o \ |
|
|
|
|
|
-name 'lost+found' -a -prune -o \ |
|
|
|
|
|
-name '*.core' -a -print > $TMP |
|
|
# \( -name '[#,]*' -o -name '.#*' -o -name a.out \ |
|
|
# \( -name '[#,]*' -o -name '.#*' -o -name a.out \ |
|
|
# -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \ |
|
|
# -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \ |
|
|
# -a -atime +3 -exec rm -f -- {} \; -a -print > $TMP |
|
|
# -a -atime +3 -exec rm -f -- {} \; -a -print > $TMP |
|
@ -59,9 +60,9 @@ echo "" |
|
|
echo "Possible core dumps:" |
|
|
echo "Possible core dumps:" |
|
|
egrep '\.core' $TMP |
|
|
egrep '\.core' $TMP |
|
|
|
|
|
|
|
|
echo "" |
|
|
|
|
|
echo "Deleted files:" |
|
|
|
|
|
egrep -v '\.core' $TMP |
|
|
|
|
|
|
|
|
#echo "" |
|
|
|
|
|
#echo "Deleted files:" |
|
|
|
|
|
#egrep -v '\.core' $TMP |
|
|
|
|
|
|
|
|
rm -f $TMP |
|
|
rm -f $TMP |
|
|
|
|
|
|
|
|