Find all files in the current directory and its subdirectories and search for the string "foo" in each file, returning the names of the files that contain the string.
find . -type f -exec grep -li "foo" {} \;