This question already has an answer here:
I want to locate all text-files within a directory tree containing two words,
word2 (for example). I cannot just
word1 word2, because this will only find occurrences where the two words appear consecutively. I want to find all files that contain both these two words, but not necessarily consecutive.
Ideally, the search should print file names as well as the context where the terms were found inside the files. This would be very helpful. A GUI wouldn't hurt.
How can I do it?