Find all files with the name ending in ".txt" in the current directory and its subdirectories, and change the permissions of those files to read-only for all users.
find ~ -iname "*.txt" | xargs chmod -R 0444