X-Spam-Check-By: sourceware.org
Message-ID: <4468E935.1080701@serv.net>
Date: Mon, 15 May 2006 13:48:53 -0700
From: L Anderson <lowella@serv.net>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050217
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Inconsistency in find ... -name ...
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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/

