grep ignore folder code example
Example 1: grep but exclude directory
grep -rli --exclude-dir=/path/to/exclude "keyword"
Example 2: grep exclude directory
grep -rli --exclude-dir={dir1,dir2,dir3} keyword /path/to/search
grep -rli --exclude-dir=/path/to/exclude "keyword"
grep -rli --exclude-dir={dir1,dir2,dir3} keyword /path/to/search