Find all files with the extension ".txt" in the current directory and its subdirectories, and then search for the string "pattern" in those files and list the files that contain the string.
find ./ -name "*.txt" | xargs grep -l "pattern"