Using GREP to search for files containing specific text

GREP is a very handy little tool that will look inside files for things.  I came across a need to recursively search all files in my current directory for a certain string. Grep did this beautifully. The command I used is:

grep -r “text string to search” .

That did the trick! Thanks to cyberciti.biz for the information.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.