Over a million developers have joined DZone.

Find Files With A Certain Extension, Where The Files Contain A Certain Search Term

Searches the current directory and deeper for files ending with the 'php' extension, where the file itself contains 'search_term'. Useful if you're searching a large website with lots of images and you only want to find a certain function or variable.

find ./ -type f -name \*.php -exec grep -il "search_term" {} \;

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}