X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9071B385E015
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1584904232;
	bh=SEX7qID2hqxk2Q6ZqirRmG0MFXxKj+HZR4pFiFDlTmQ=;
	h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=JVUoh3osxn54Dxo6dgY5DWqC/WOe/AUVkrpBhq0Bj4odXc1BmC3pZ7sqM0pYraGZI
	 TztZNbc+EBAQxbUI7rHIynL1vhuRV2v4GUWCxPOHp4zeYtbgvygf0mJMQm7pF+RCa+
	 m9PRSPaK2oNw9NfQvKrVG4KJ6Kx30f9XMR5NtwdU=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E1855385E001
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-transfer-encoding;
 bh=rEZi9JkER4JRympuwZLwirOVhdsUzgpcugWFUwGU4VU=;
 b=Dg6YbeY5lBQ4N6sPr40bHEeC4YcT1AxVAxhgGto0GcniiXmpWoIEWtVxiyjxsx9mcO
 1QBO2gz+ilBpwHb3aLCZ1m7QNEnN2QDkSSawCVAzE33imIL2lYjKM3worOYP2z/vl89r
 0z3LlPhLs+IP5sWqLceo79ATkWmXB0u4I6FxsjIEuq9kQ8+j3K67SuR3oXoTbXtHgLjm
 A2tMn5yLwtAiZ/rebqAQGrlke3M9uvoPx2AltXGiQqpm+bJDjaY3TCVEnzmbWsZG3sbl
 dIOvG72cNFxIgLbiV+zv0gUT0WPp3XlD/EvuBl0xxcG3r1NTxXbFsqwDMYUUKrhzs/47
 SUkg==
X-Gm-Message-State: ANhLgQ0yJR5oQVnJJNGFjFgQzeMPsjW6s8zPcL0v7Rju8UnOCNeLLLtB
 TYy0MlsPk0asNkptSd/vy+hAjfHM
X-Google-Smtp-Source: ADFU+vvGOhXD9+l5UWPsEf0oa8YNpwzTC7ii1vM1+guLCPkIMxgaaOU791TX5i5Vux4MSInfQavu1w==
X-Received: by 2002:adf:afd4:: with SMTP id y20mr26561841wrd.57.1584904227726; 
 Sun, 22 Mar 2020 12:10:27 -0700 (PDT)
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: "cygwin@cygwin.com" <cygwin@cygwin.com>
References: <DM5PR13MB087674FC4FC989DE45C41E8ECBF30@DM5PR13MB0876.namprd13.prod.outlook.com>
Message-ID: <1cff979e-1ec6-285d-f761-7acff17a3483@gmail.com>
Date: Sun, 22 Mar 2020 20:10:23 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.6.0
MIME-Version: 1.0
In-Reply-To: <DM5PR13MB087674FC4FC989DE45C41E8ECBF30@DM5PR13MB0876.namprd13.prod.outlook.com>
X-Spam-Status: No, score=-1.8 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@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Cygwin mailing list <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <http://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin@cygwin.com>
Reply-To: Marco Atzeri <marco.atzeri@gmail.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

Am 22.03.2020 um 18:50 schrieb Jay Libove via Cygwin:
> 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@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
> 

any reason for NOT using a cygwin shell ?

for discrepancy check the ACLs of the files with "cacls"

--
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
