How do I recursively view a list of files that has one string and specifically doesn't have another string? Also, I mean looking inside the files, rather than the file names.

link|improve this question

50% accept rate
feedback

1 Answer

You can use find:

find . -type f -name "$fileglob" -exec grep -q $word1 {} \; -not -exec grep -q $word2 {} \; -print
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.