delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/31/10:52:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-Id: <5.2.0.9.2.20030131074740.03418ef8@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Fri, 31 Jan 2003 07:52:22 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: RE: Problems with find
In-Reply-To: <000001c2c937$eb95ea10$0302a8c0@calvin>
References: <200301310857 DOT h0V8vGO01862 AT mailgate5 DOT cinetic DOT de>
Mime-Version: 1.0

Ian,

At 06:49 2003-01-31, Ian R. Chesal wrote:
>Your syntax is incorrect. Try:

No. Both Franz's and your syntaxes are acceptable. A backslash is 
equally useful for protecting the shell glob character '*' as is 
surrounding the argument (or just the asterisk) in single or double quotes.

Franz's problem was that when he use "ls" to show the files, he 
_didn't_ use an unquoted star (he didn't use a star at all), so ls 
showed only the file whose name appeared literally in its invocation.

Me may also have been confused about where the problem lay, think it 
was in "find" rather than "ls" (when in fact it was just plain old 
cockpit error).

Randall Schulz


>     find . -name "1000*"
>
>I just tried in in /tmp on my cygwin installation and here's the output:
>
>     $ find . -name 1000* -o -name 1000.*
>     ./1000
>     ./1000/1000.zip
>     ./1000.tar.gz
>
>You can limit the find to just files or directories with the -type flag.
>Do 'info find' to learn more. The way you had the expression written
>each conditional was joined with an implicit -a (and) so that find would
>only print if all three evaluated to true. You wanted a -o (or) between
>each pattern but really you can accomplish what you want with a quoted
>pattern, which IMHO is a more straight-forward way to look for what you
>want.
>
>Ian
>
>-----Original Message-----
>From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf
>Of fj_br_ AT web DOT de
>Sent: January 31, 2003 3:57 AM
>To: cygwin AT cygwin DOT com
>Subject: Problems with find
>
>
>Hi folks,
>
>I trie to search file with find an didn't find all the file which should
>be found
>
>I search for all file starting with 1000 an the file 1000.zip in the
>diretory 1000 is not found $ find . -name 1000\* ./1000.zip ./1000
>
>but when I ls the directory 1000 the file is listed
>$ ls 1000
>1000.zip
>
>As you can see I use the find installed in /usr/bin
>$ which find
>/usr/bin/find
>$ type find
>find is hashed (/usr/bin/find)
>
>
>what is wrong? Is it a bug or my fault?
>
>Thanks for any help and hint
>
>Franz


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019