LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   search php code in folder and subfolder (https://www.linuxquestions.org/questions/linux-newbie-8/search-php-code-in-folder-and-subfolder-4175442528/)

afradata 12-22-2012 12:58 AM

search php code in folder and subfolder
 
Hi 2 All

I want seraching a php code in a folder and subfolder file By command line
my linux is centos 5.8

For example

i want search All files that PHP code {echo phpinfo ();} in Folder temporary /home

Thank You

divyashree 12-22-2012 04:00 AM

Try this

Code:

find /home -exec grep -il "{echo phpinfo ();}" {} \;


All times are GMT -5. The time now is 09:43 AM.