Find a text inside multiple files in linux

To find files that contain a text string in linux is very easy. Open terminal locate to the folder. Use below command.

grep -lir “search text” *

The -l switch outputs only the names of files in which the text occurs, the -i switch ignores the case, and the -r descends into sub directories.

Ranjith Kadamboor
Ranjith Kadamboor

Programmer with 15+ years of broad experience in Software Design and Development, Interested in Blockchain and Crypto.

Leave a Reply

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

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in