delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/03/22/15:09:47

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85750385E01C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1584904132;
bh=4yhwqE43XrMD1AeeDdOQ6cKjyoV1XrcivE22zpqNEDM=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=IngwdXfxEF6Cqo9MhDdKQDr3/qkDDh0sQp7/8RxOmisHUk3wrOMPpYqoYeqnRqI7e
qpdio3Br8t45R9GFpTsG8PKoTXDLnwpcdax+Z+ZbpRC2jdC7Fz681tAhOI6DH0+2+e
4qYyJ/2BABRjz83Wnejb/RsXCAypq2fBGOZ7RExw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5D4B8385E001
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=zqRubHMc9+m1qpx3JvuVg9c7lvpxXU5AzbOtGNEyVmA=;
b=MHM42GNDzW7UexHhbzNIc8szneeL4pLyT1Qsd0OopeW1Tebe7giZsm3TgtrDrBLw/n
8n5JOUBKBLXcWyDmkJ28oLwcGdPT7NSJIKHphnUIRKVK2DDyeXQjfwj9wGrIXTpChFy0
zhEPo5pN95FnN9cAcaPB/BUBoOuB35rFHaxjx0SeDnr0PmEpQiv5od+ANMmbXiUeUHWQ
3Dp+DgHV2e1oN9veQiQ3hXEw6B8Ff70csYcMFfTAV9c6f0ndxNykYD7+BLs6n/IhBpFI
uxfI//GbGNc7NWmb4SNsBLH+czT0UqHNo9vhs5fhpVAlESxHiBzuE3J0DuSmK8Vric75
/1zQ==
X-Gm-Message-State: ANhLgQ1jpXXqFsx9ncGAbplKmvtFNco1TcyyEK9Dgr5rLCg0N3uFUHrq
1AmCPSeaPYOXuTjPCHoAL/laIk3oiwPiJ4w+n7o=
X-Google-Smtp-Source: ADFU+vubZna5VzesTYQFhRhKggs3f2UH/N3Jp5uNr3ZmzyWSxfYeHxFKY4/gJhjuQBUzWDZahzYjMlPpxTJ68ddAAgE=
X-Received: by 2002:aed:2c06:: with SMTP id f6mr17778642qtd.337.1584904129877;
Sun, 22 Mar 2020 12:08:49 -0700 (PDT)
MIME-Version: 1.0
References: <DM5PR13MB087674FC4FC989DE45C41E8ECBF30 AT DM5PR13MB0876 DOT namprd13 DOT prod DOT outlook DOT com>
In-Reply-To: <DM5PR13MB087674FC4FC989DE45C41E8ECBF30@DM5PR13MB0876.namprd13.prod.outlook.com>
Date: Sun, 22 Mar 2020 19:08:38 +0000
Message-ID: <CACac1F_rKFLb3dCj-ZQPW3CHo3gATo+H4FD+E+PB6y9d+uKN0A@mail.gmail.com>
Subject: Re: shell expansion produces e.g. "ls: cannot access '*.pdf': No such
file or directory" in Windows CMD shell, but works okay in bash
To: Jay Libove <libove AT felines DOT org>
X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: Cygwin mailing list <cygwin.cygwin.com>
List-Archive: <http://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Paul Moore via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Paul Moore <p DOT f DOT moore AT gmail DOT com>
Cc: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Is this because cygwin globbing is (by default) case sensitive? You
could set the CYGWIN environment variable to "glob:ignorecase" to get
case-insensitive behaviour.

Paul

On Sun, 22 Mar 2020 at 17:52, Jay Libove via Cygwin <cygwin AT cygwin DOT com> wrote:
>
> I've never seen this before.
> In a Windows CMD shell, Cygwin shell expansion, for example:
> ls *.pdf
>
> returns:
> ls: cannot access '*.PDF': No such file or directory
> (Indeed, any Cygwin shell expansion, when executed from within Windows CMD, produces this error. See below)
>
> ls *someotherwildcard* (that matches the same .pdf files) DOES return the expected file list.
>
> Example:
>
> C:> DIR *.pdf
> Volume in drive C is C
> Volume Serial Number is 8674-712A
>
> Directory of C:\Temp
>
> 22/03/2020  18:30         1.675.954 test.pdf
> XX/XX/XXXX  XX:XX         {Any many other .pdf files}
>
> Yet:
>
> C:> ls *.pdf
> ls: cannot access '*.pdf': No such file or directory
>
> And:
> C:> bash
> user AT hostname /cygdrive/C/Temp/test
> $ ls *.pdf
> A.pdf
> B.pdf
> {etc}
>
> And, not ALL of the *.pdf files in the particular directory where I've encountered this trigger the problem...
>
> C:> ls N*.pdf
> N.pdf
>
> C:> ls A*.pdf
> ls: cannot access 'A*.pdf': No such file or directory
>
> Nor do all directories containing .pdf files produce this. Of the many thousands of files and directories that I have, only some produce this problem.
> In others, ls *.pdf works perfectly in Windows CMD.
>
> I've looked at the Windows ATTRIB and CACLS of the files in directories where this problem occurs.
> They're all the same. That is, uniform across all files and directories. Nothing interesting.
>
> It's not just 'ls':
>
> C:> cat *.pdf
> cat: '*.pdf': No such file or directory
>
> So, it appears to be Cygwin shell expansion, when executed under Windows CMD, which is provoking this strange behavior.
> Any ideas what could be causing this, and how to solve it?
>
> many thanks,
> Jay
>
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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