searching a particular string in all files of a single folder
Hi all,
I just want to know if we can search for a particular string in all files of a particular folder in linux. if a folder has 100files only that hundred files needs to be checked for a particular string. if its there,kindly post your suggestions. Thanks®ards, Dinesh. |
Hi,
Yes, you can do that in 2 easy steps. Code:
cd /to/the/specific/folder Hope this helps. |
Command# grep -r "string" /root/*
Use the above command to search for a "string" in all the folders under root directory |
Thank you very much both that works..
|
You're welcome :)
|
Just a reminder, that grep is CaSE sENSitiVe, so in order to make it not sensitive use option "-i".
|
All times are GMT -5. The time now is 11:54 PM. |