: Discover Excellence

The Path To Discover Excellence

Tuesday, 23 February 2016

Search word or file Using SSH(Putty)

 Fastest and efficient way is to use grep command

For search in a file :

grep "wordtofind" config.php

For search the word and get list of files form current directry 

grep -l "wordtofind" *

For search the word recursively from all the subfolders:

grep -r "wordtofind" *

or to read Human readable format 

grep -r -H "wordtofind" *


No comments:

Post a Comment