Find all files with the extension .rb in the current directory and its subdirectories, and replace the word "From" with the word "To" in each file.
find ~ -type f -name '*.rb' -exec sed -i -e 's/From/To/' {} \;