28
Mar
2011
admin

How to search text in files or folders in Command Line of Ubuntu

 

Applications -> Accessories -> Terminal

and write the following command:

grep -i -n -r ‘searchtext’ *

-i for ignore case sens, -n for line number and -r for recursive

where searchtext is the text you want to search in your files.

This will bring the results with the file names, containing all the files which has the text searchtext.