Search This Blog

Tuesday, September 6, 2016

Linux : how to search for content in files and directory

Hi,

Recently need to find some string pattern in the files on linux box , following grep command did a trick  :

grep -rnwl '/home/mypath' -e "searchStringPattern"

r-recursive
n-line number
w-whole word match
or
i- ignore case

l-  show only filenames


Cheers,
Kapil



No comments:

Post a Comment

Thanks for your comment, will revert as soon as we read it.

Popular Posts