Follow-up Comment #1, bug #51711 (project findutils):

Certainly the problem is real, but it's even more complicated.

As far as I can tell, the error message means, "Syntactically, this is a
situation where a predicate must occur, but this argument is not a predicate. 
It looks like what would happen if you tried to specify a directory, but
didn't put it in front."

You write, "How could one know, that options like "-name" can only have one
name?"  Well, the documentation says that -name can have only one argument.

The problem is amplified by the fact that what you wrote (*.c) isn't what find
saw ... but that is actually a central feature of all Un*x-style shells -- the
expansion of non-escaped wildcards (but only when they match at least one
existing file).  Like smoking a cigar in a fireworks store, it works fine as
long as you're constantly aware of it.

It would probably be better if the message didn't assume you were trying to
specify a directory but rather explained the problem literally.  Something
like "Argument 4 is 'fax2.c', following 'find . -name fax1.c', but it is not
used as an argument by the preceding predicate and directories to be searched
must appear before all predicates."


Reply to this item at:


  Message sent via/by Savannah

Reply via email to