From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id E1855385E001 for ; Sun, 22 Mar 2020 19:10:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E1855385E001 Received: by mail-wr1-x443.google.com with SMTP id z15so14151321wrl.1 for ; Sun, 22 Mar 2020 12:10:28 -0700 (PDT) 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) Received: from ?IPv6:2003:ee:6715:5401:6d8a:1397:ce72:f044? (p200300EE671554016D8A1397CE72F044.dip0.t-ipconnect.de. [2003:ee:6715:5401:6d8a:1397:ce72:f044]) by smtp.gmail.com with ESMTPSA id o133sm18238067wme.35.2020.03.22.12.10.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); 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" References: From: Marco Atzeri 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 19:10:30 -0000 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"