ack-grep
grep -r で再帰的に検索すると.svn/ や.git/ 以下のファイルまでひっかかる。
だからといって毎度毎度
とかするのは面倒。そういうときはack-grepが便利。
$ grep -r hoge | grep -v svn
インストールはaptで。
$ sudo apt-get install ack-grep
でカレントディレクトリ以下を再帰的に検索してくれる。
$ ack-grep hoge
特徴
.ackrc というファイルでいろいろオプションを設定できるらしい。これについては気が向いたら調べる。
参考
ack -- better than grep, a power search tool for programmers
- "Top 10 reasons to use ack instead of grep." がなぜか13個ある