David L. answered 05/14/23
Tutor
4.9
(2,058)
Tech support engineer with Linux & UNIX experience (no C or C++)
Your code contains "grep -H", which prints names of those files, along with matching lines. You want grep -l (lowercase L), which prints the name of the file, without the matching lines.
Thus, this will work:
find / -type f -exec grep -l 'text-to-find-here' {} \;
Another way of doing this is:
grep -rl 'text-to-find-here' \