Louis I. answered 05/26/19
Computer Science Instructor/Tutor: Real World and Academia Experienced
As per the grep manual page, it's possible to specify an exclusion list of both files and directories.
See below:
--exclude-dir=DIR
Exclude directories matching the pattern DIR from recursive
searches.
--exclude-from=FILE
Skip files whose base name matches any of the file-name globs
read from FILE (using wildcard matching as described under
--exclude).