I am trying to (recursively) check one of my directories to see which files are XML files. Any pointers would be appreciated.

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted
find /path/to/directory -type f -name "*.xml"

Finds all files in the given directory (and all subdirectories) with a name ending with .xml. Use -iname for case insensitive name matching instead.

link|improve this answer
To do this recursively? – Dark Templar Jan 4 at 1:03
@DarkTemplar It already is. – Daniel Beck Jan 4 at 1:03
This is exactly what I needed. Thank you! – Dark Templar Jan 4 at 1:07
1  
@DarkTemplar You're welcome. Btw, find is much more powerful and really handy with many different problems. Check out its man page. – Daniel Beck Jan 4 at 1:09
Aight. Got it ;) – Dark Templar Jan 4 at 1:23
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.