Exclude directories from recursive grep

How often are you using grep in subversionned folders like that :

grep -rni foobar . | grep -v .svn

Upgrade to grep 2.5.3 and use (alias it ?)

grep -rni --exclude-dir .svn foobar .

(or … stop using SVN ! ! !)

This entry was posted in unix and tagged , . Bookmark the permalink.

One Response to Exclude directories from recursive grep

  1. alkomatyy says:

    Whoa! This blog looks just like my old one! It’s on
    a completely different subject but it has pretty much the
    same layout and design. Superb choice of colors!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>