Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-22-2012, 01:58 AM   #1
LQ Newbie
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
Question 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
Old 12-22-2012, 05:00 AM   #2
Senior Member
Registered: Apr 2007
Location: bbsr,orissa,India
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Try this

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefiles, building source from another folder with obj files > subfolder of current? Funkster Programming 1 11-11-2011 07:29 AM
[SOLVED] Delete a subfolder ABC from main Project Folder adarshmca Linux - Newbie 4 08-01-2011 12:52 AM
Show folder and only one subfolder using ls in command line Drigo Linux - Newbie 4 07-14-2011 01:56 PM
[SOLVED] Apache/Php code to recursively display folder content lpallard Programming 1 12-30-2010 05:03 PM
how to run a script on subfolder file in a folder saggi_sam Linux - Newbie 5 07-13-2005 06:04 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration