Thursday, January 24, 2008

How to find files containing a string in Unix

For that, you can write:

find {directory} -type f | xargs grep -l "{stringToFind}"

This is really useful... specially to find out how certain things work (configuration files, like for example
those used inside eclipse are really harder to find without this command)