Imagine a source tree. There are xml files everywhere.But since there is a XYZ.xml at the root of this tree it won't find my xml files.find -iname *.xmlreturns./XYZ.xmlinstead of./XYZ.xml./a/b/c/bob.xml./b/d/top.xml
find not recursive when file at top
bash;find;recursive
find -iname '*.xml'Otherwise, your shell expands *.xml to XYZ.xml, and the command that actually gets executed isfind -iname XYZ.xmlThe reason it works if there are no XML files in the current directory is that shells generally leave wildcards unexpanded if they don't match anything.  In general, any time you want wildcards to be expanded by a program other than the shell (e.g. by find, tar, scp, etc.) you need to quote them so the shell won't try to expand them itself.