How can I search for a code snippet in all folders/files of a site?
I can't find the line of code I'm looking for. It's a large site and looking through file by file is not reasonable. How can I go about finding this snippet?
Other details:
It's a Drupal site
I use a Mac
Code editing software I currently have avail: Coda, Text Wrangler, Dreamweaver
Any help would be incredibly appreciated.
Just use grep
- take a closer look at this tool here: http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
FYI: it is a command-line tool.
Also consider that Drupal may be storing something within the database, even the PHP code (which happens when you have PHP filter enabled for some contents and put PHP inline). Thus you may not find the specific code snippet within the code of the application and then you will probably need to look into the database.