URL: <http://savannah.gnu.org/bugs/?51711>
Summary: non-helping error output with find Project: findutils Submitted by: None Submitted on: Wed 09 Aug 2017 11:12:29 PM UTC Category: find Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: kalle Originator Email: ka...@projektwerkstatt.de Open/Closed: Open Discussion Lock: Any Release: 4.4.2 Fixed Release: None _______________________________________________________ Details: akraum@akraumGI ~/Downloads $ ls 2017-07-29_Entwurf-Berichtsteil-Lebensstile.pdf Ant Videos blockadesw.jpg blockbunt.jpg DSC1316.jpg faustklein.JPG fax.pdf notanugget.jpg todktter1.jpg todktter2.jpg Widerstand-gegen-Wiesenhof-Part-1.pdf akraum@akraumGI ~/Downloads $ LANG=C find . -name fax* bloc* find: paths must precede expression: blockadesw.jpg Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] This was, what I got by typing two patterns into find-command. The answer "paths must precede expression" didn't help me any further in understanding the problem, since my path "." was preceding the expression "-name fax* bloc*". How could one know, that options like "-name" can only have one name? Invoking "man find", it says at the bottom of the page: "NON-BUGS $ find . -name *.c -print find: paths must precede expression Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] This happens because *.c has been expanded by the shell resulting in find actually receiving a command line like this: find . -name bigram.c code.c frcode.c locate.c -print That command is of course not going to work. Instead of doing things this way, you should enclose the pattern in quotes or escape the wildcard: $ find . -name \*.c -print" Here it assumes, that "of course" this will not work. No more explanation. This is not enough. Furthermore I don't understand why it gave out to me the file "blockadesw.jpg". Obviously, it is the first file, to match a pattern. My version is findutils 4.4.2 thanks, kalle _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51711> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/