7nylkw
Last Updated: February 25, 2016
·
3.771K
· marchibbins
Af8d531a314a6819bc1e1ae00fc3a885

Exclude directory from grep, e.g. .git, .svn

Using GNU grep:

grep --exclude-dir=".git"
Say Thanks
Respond

3 Responses
Add your response

3204
50f5b66bf5ddc8b45e578aba878c3a54

I tend to use ack. It's a great tool - definitely worth a look.

https://metacpan.org/module/PETDANCE/ack-1.96/ack-base

over 1 year ago ·
3252
E77a97b7bec8a0dc42fee8ecb640cb25

Seconding ack - it does things like this that you'd just want without having to be told about it. Ack is far nicer to use than grep, IMO.

over 1 year ago ·
11280
8c65bdab337b8aa043bd470d3cbf3531

git grep solves the specific problem rather well

over 1 year ago ·
Filed Under