-->
-->
You can use grep to find a string contain in files. If you want to find a string named “my_keyword” from the all files in the folder /home/prasad/ and its sub-folders, you can find it by below command:
grep -i -n -r 'my_keyword' /home/prasad/
-i means ignore case
-n means output line number
-r search recursively (to include all sub-folders)
====
Example:
root@RSETPrasad:~# grep -i -n -r 'http_proxy' /root/Desktop/test/
/root/Desktop/test/test.log:9:#export http_proxy=”http://$username:$password@192.168.30.12:8080/”
/root/Desktop/test/test.log:19:http_proxy="http://192.168.30.12:8080/"
/root/Desktop/test/1/test_1.log:9:#export http_proxy=”http://$username:$password@192.168.30.12:8080/”
root@RSETPrasad:~#