Find all files (including those in subdirectories) in the current directory and its subdirectories, and print their names, then use the output to search for the string 'foo' and print the names of the files that contain it.
find ~ -mindepth 2 -print0 | xargs -0 grep -l 'foo'