Quote:
Originally Posted by pwc101
try
find ./ -name "*.xml"
the quotes seem to make it work for me.
|
And it's worth elaborating on that!
The reason is that *.xml (w/o quotes) gets globbed
by the shell before find gets the string. Therefore,
if there's a file with that extension in that directory
find will search for this one file (which is quite unlikely
to be the intention).
So, if there's ONE file with that extension, find will find
that one file. If there's more than one, find will fail, because
only the first returned glob will be used as a name -
the others are garbage to find:
Code:
find: paths must precede expression
Usage: find [path...] [expression]
is what you'll see.
Cheers,
Tink