Thursday, July 29, 2010 22:24

Linux Find Files Containing Text

Tagged with:
Posted by ukoom on Wednesday, January 27, 2010, 13:54
This news item was posted in Linux category and has 0 Comments so far.

Find files that contain a text string:

grep -lir “some text” *

The -l switch outputs only the names of files in which the text occurs (instead of each line containing the text), the -i switch ignores the case, and the -r descends into subdirectories.

Related Posts

Leave a Reply

You can leave a response, or trackback from your own site.