Thursday, October 2, 2014

grep in a bunch of files

I always have to look this up so I'm posting a note to myself here. To grep through all the files in a directory, recursively, and only get back a list of the files containing the string, do:

tomcat@merchant101 $ grep -lr "import" .

Found this in this blog.

No comments: