How do you search for specific text in specific file types? [duplicate]

find . -type f -name '*.extension' | xargs grep "string"

This command runs find on the local directory (.) for any files with names matching the pattern *.extension, then runs grep for "string" on the results of the find. Note that find is inherently recursive. As long as you can differentiate the files that you want from the files you don't based on name, this should work for you.