Thanks! I didn't know about the --exclude-dir option.
On Thu, Jan 7, 2021 at 7:16 AM Paul Eggert <egg...@cs.ucla.edu> wrote: > On 1/6/21 12:12 PM, Fred .Flintstone wrote: > > Yes, I meant like Tanaka said, I want BOTH to include AND exclude. > > So I can include only a file extension, and exclude certain directories > > such as directories containing unit tests and integration tests. > > grep -r --include='*.cs' --exclude-dir='tests' PATTERN DIR >