FIND/REPLACE RECURSIVELY

If the word CAT was to be replaced
with the word DOG in all files
starting at the top of /home/kennel
and all subdirectories below it:

$ grep -rlZ CAT /home/kennel | xargs -r0 perl -pi -e 's/CAT/DOG/g'

NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.