Monday, 3 December 2012

grep recursively excluding svn (or git) files

It's as easy as:

grep -nr --exclude-dir .svn 'something to grep' path

I personally set an alias:

alias gr='grep -nr --exclude-dir .svn '

so I can just type:

$ gr 'something to grep' path

and avoid any result from svn files.

No comments:

Post a Comment