www.delorie.com/archives/browse.cgi | search |
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 AT serv DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050217 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Inconsistency in find ... -name ... |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |