|
@ -1,6 +1,6 @@ |
|
|
#!/bin/sh - |
|
|
#!/bin/sh - |
|
|
# |
|
|
# |
|
|
# $OpenBSD: daily,v 1.49 2005/03/16 18:29:58 millert Exp $ |
|
|
|
|
|
|
|
|
# $OpenBSD: daily,v 1.50 2005/03/17 18:16:52 millert Exp $ |
|
|
# From: @(#)daily 8.2 (Berkeley) 1/25/94 |
|
|
# From: @(#)daily 8.2 (Berkeley) 1/25/94 |
|
|
# |
|
|
# |
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin |
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin |
|
@ -26,18 +26,20 @@ echo "" |
|
|
echo "Removing scratch and junk files:" |
|
|
echo "Removing scratch and junk files:" |
|
|
if [ -d /tmp -a ! -L /tmp ]; then |
|
|
if [ -d /tmp -a ! -L /tmp ]; then |
|
|
cd /tmp && { |
|
|
cd /tmp && { |
|
|
find -x . \( -path './ssh-*' -o -path './.X11-unix' \) -prune -o \ |
|
|
|
|
|
-type f -atime +3 -execdir rm -f -- {} \; |
|
|
|
|
|
|
|
|
find -x . \ |
|
|
|
|
|
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \) \ |
|
|
|
|
|
-prune -o -type f -atime +3 -execdir rm -f -- {} \; |
|
|
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ |
|
|
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ |
|
|
! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; } |
|
|
|
|
|
|
|
|
! -path ./.ICE-unix ! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; } |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ -d /var/tmp -a ! -L /var/tmp ]; then |
|
|
if [ -d /var/tmp -a ! -L /var/tmp ]; then |
|
|
cd /var/tmp && { |
|
|
cd /var/tmp && { |
|
|
find -x . \( -path './ssh-*' -o -path './.X11-unix' \) -prune -o \ |
|
|
|
|
|
! -type d -atime +7 -execdir rm -f -- {} \; |
|
|
|
|
|
|
|
|
find -x . \ |
|
|
|
|
|
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \) \ |
|
|
|
|
|
-prune -o ! -type d -atime +7 -execdir rm -f -- {} \; |
|
|
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ |
|
|
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ |
|
|
! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; } |
|
|
|
|
|
|
|
|
! -path ./.ICE-unix ! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; } |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# Additional junk directory cleanup would go like this: |
|
|
# Additional junk directory cleanup would go like this: |
|
|