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

It's not a sprint

You’ve surely heard at least once in your life somebody saying “Calm down: it’s not a sprint, it’s a marathon”. People use this phrase to tr...