Search files with specfic extention and later search content

Hi,

I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search.

-Lovin.V

find /home/username -name '*.xml' -exec grep '<start>' {} +

If your find does not support the + syntax, try this:

find /home/username -name '*.xml'|xargs grep '<start>'

It should be more efficient than:

find /home/username -name '*.xml' -exec grep  '<start>' {} \; -print

But you should modify it if the filenames contain spaces or other pathological characters.

Awesome.. You nailed it.

Thanks,
Lovin.V