Search recursively (-r) for the string 'foo' (-H) in all files (-I) in the Documents directory (~/Documents/*) and print the filename and line number (-n) of each match.
grep -rnzIH 'foo' ~/Documents/*