Tags | |

Searching for text in files with Linux

Searching for text inside many files is really easy when you are using linux.



To search for text inside a given file use:



grep "some word" filename.extension


To search for a string in multiple files in linux use the following command:



grep -r "some word" *


You can also substite the wildcard with just *.extension or file.*




Comments

Feel free to leave a comment or question

Name: (Optional but appreciated):

Comment:

Use [code] [/code] for code block style



Security Code: