what command can i use to search the files in a directory for a text. the output would list the files containing the text. ive tried this but it is not exactly what im looking to do: find . -name "*.xml" -exec agrep searchstring {} \;
find /some/startpath -type f -name \*.xml | xargs grep -l some_pattern
You were almost there, to complete what you had started:
find . -name "*.xml" -exec grep -l searchstring {} /dev/null \;