bash find text string in multiple files

Posted by on Aug 17, 2013 in Bash, Wordpress | 0 comments

Being able to search for a string of code across multiple files for wordpress development (or any code) is extremely useful. Especially jumping into a theme someone else built. This is the bash function I use.

This command will search all the .php files in the directory you’re in, and all directories below for the string class=”widget-area”. It outputs the entire line that the string is on and the name of the file.

Usage: mfind filetype string

Read More