################################################################################ # # Module: find_recent_large_files.sh # Author: Peter R. Schmidt, PRS Technologies, Inc., http://www.prstech.com # Description: find recently created large files # ################################################################################ # find recenty created large files rm -f find.out echo echo "Enter directory to search" read DIRNAME if [ ! -d $DIRNAME ] then echo "Error: directory $DIRNAME does not exist" exit 1 fi echo echo "How large a file do you want to look for ? (in Kbytes)" read SIZE echo echo "How many days since the file was created ?" read DAYS echo echo "Searching..." find $DIRNAME -type f -size +$SIZE -mtime -$DAYS -exec ls -ls {} \; | sort -n -r | tee find.out echo echo "Done" echo echo "Note: output in find.out" echo