This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Inconsistency in find ... -name ...
- From: L Anderson <lowella at serv dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 15 May 2006 13:48:53 -0700
- Subject: Inconsistency in find ... -name ...
Using find, I didn't protect spec in -name (-name 'spec') in a couple of
instances but they still worked, viz-a-viz:
$ find /home/lowella -type f -name *.h
/home/lowella/CVSROOT/src/newlib/doc/ansidecl.h
...
$ find /home/lowella -type f -name *.pl
/home/lowella/test/examp001.pl
...
whereas a couple of others didn't work, viz-a-viz:
$ find /home/lowella -type f -name *.txt
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
$ find /home/lowella -type f -name *.c
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
Could someone please tell me why the inconsistency and why
$ find /home/lowella -type f -name *.h
$ find /home/lowella -type f -name *.pl
work but
$ find /home/lowella -type f -name *.txt
$ find /home/lowella -type f -name *.c
doesn't?
Based on my reading of find and bash documentation, perhaps I missed the
explanation.
Also, I rhetorically ask, why does
$ find /home/lowella -type f -name '*.txt'
work but
ls '*.txt'
doesn't?
Thanks,
L Anderson
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/