I am trying to figure out how to search for "_iterator_tag" string in all sub directories recursively and in files with extensions .cpp, .h, .hpp, .cxx, .inl for now all I can do is search each of these file types separately as below grep -R "_iterator_tag" --include '*.cpp' Is there a quicker way to search all of these file types together? Thank you
use ack. It's great for searching source code (and not looking in images, or RCS artifacts, like .svn directories)
You can specify multiple instances of
--include
on the command line (they are "or"ed together).Edit: Specifically
try
I define the following aliases in my .bashrc
So I'd typically do:
Of course you'd need a different set of file types.