0

Possible Duplicate:
find not recursive when file at top

I'm having some confusion with the find command.

If I type:

find . -name *.xml

or

find ./ -name *.xml

I receive a list of all the xml files in subdirectories of the current directory, UNLESS the current directory contains an xml file, in which case I get:

find: paths must precede expression: foo.xml
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

What is the correct way to search for files with wildcard when the current directory may contain a match?

Eric Wilson
  • 4,722

0 Answers0