Patch to find(1) to find large files.
Chris Torek
chris at umcp-cs.UUCP
Sun Jun 9 12:59:38 AEST 1985
(This doesn't belong in net.bugs.4bsd anymore...)
> Do you run find on your machine every night? Do you know what it has
> to go through just to find out if a file is three days old and smaller
> than 10 blocks or owned by `fred' or setuid root?
Yes, which is why I tried to combine all the things we need done for
removal of files into one big find script:
#! /bin/sh
#
# find_cleanup - find the files that should be removed and clean them
# out of the file system.
find / \( \( -name '#*' -atime +1 \) \
-o \( -name ',*' -atime +1 \) \
-o \( -name rogue.sav -atime +7 \) \
-o \( \( -name '*.bak' \
-o -name '*.dvi' \
-o -name '*.CKP' \
-o -name '.*.bak' \
-o -name '.*.CKP' \) -atime +3 \) \
-o \( -name '.emacs_[0-9]*' -atime +7 \) \
-o \( -name core \) \
-o \( -user guest -atime +9 \) \
\) -print -exec rm -f {} \; > /tmp/.cleanup 2>&1
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at maryland
More information about the Comp.unix.wizards
mailing list