Monday September 17, 2018 10:15

How to search linux files for text

Posted by Ureviews

Print This Post Print This Post

grep -Ril “text you want to search here” .

The . is the current directory… you can change it to whatever you want… 

-R is for recursive search,  I.e subfolders (Remove if you only need the files in a specific folder)
-l  is so it spits out just the filenames containing the phrase.
-i is for case insensitive.

eXTReMe Tracker