Monday, May 9, 2011

Quick source code searching on Linux

While working on a fix in the JDK, I wanted to find all occurrences of a string in large collection of Java source.  I ended up using  Its default file type is *ML, so a simple config file of:
IndexOnly .java
IndexContents TXT* .java
did the trick.  'swish-e -c swish-e.con -i .' and then 'swish-e -w word' -- blazingly fast.

No comments: