In the linux shell, the following command will recursively search and replace all instances of 'this' with 'that' (I don't have a Linux shell in front of me, but it should do).
find . -name "*.txt" -print | xargs sed -i 's/this/that/g'
What will a similar command on OSX look like?
See Question&Answers more detail:os