[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #51711] non-helping error output with find

From: Dale Worley
Subject: [bug #51711] non-helping error output with find
Date: Wed, 9 Aug 2017 21:53:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2633.3 Safari/537.36

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

[Prev in Thread] Current Thread [Next in Thread]