Possible Duplicate:
find not recursive when file at top

I'm having some confusion with the find command.

If I type:

find . -name *.xml


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?

merged by Michael Mrozek Jun 11 '11 at 20:19

This question was merged with find not recursive when file at top because it is an exact duplicate of that question.