How-To

How to search linux files for text

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.

Disclosure: This post contains affiliate links. We may earn a commission at no extra cost to you. Prices are accurate as of publication date.
Categories: How-To

Leave a Comment

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