Mail Archives: cygwin/2003/01/31/10:52:01
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 -