Re: find - simple Python example (+ aliases)

Mike Tibbs (tibbs@dopey.si.com)
Wed, 6 Apr 94 08:49 EDT

Steve,

That's a nice exercise for python. I'll try it out.

For those of you who like aliases, here's some handy ones to make using 'find'
a little easier from csh.

#
# find aliases
#
# find big, old, new, dirs, links, man? files
alias findbig 'find . -size +1000 -exec ls -lF {} \;'
alias findold 'find . -atime +125 -exec ls -lF {} \;'
alias findnew 'find . \( -ctime -1 -type f \) -exec ls -lF {} \;'
alias findtod 'find . -ctime 0 -print' # today
alias finddirs 'find . -type d -exec ls -ldF {} \;'
alias findlinks 'gfind . -type l -maxdepth 1 -print0 -printf "\t%l\n"'
alias findlinksdeep 'gfind . -type l -print0 -printf "\t%l\n"'
alias findman 'find / -type d -name "man?" -exec ls -ldF {} \;'
# find filename, file with word, file with expression
alias findfile 'find . -name "\!*" -exec ls -ldF {} \;'
alias findword 'find . -type f -exec grep -wil -e "\!*" {} \;'
alias findwords 'find . -type f -exec grep -wi \!:1 {} /dev/null \;'
alias findexp 'find . -type f -exec grep -il -e "\!*" {} \;'
alias findexps 'find . -type f -exec grep -i \!:1 {} /dev/null \;'