From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by sourceware.org (Postfix) with ESMTPS id 372733893647 for ; Mon, 18 May 2020 18:03:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 372733893647 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinwoodie.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adam@dinwoodie.org Received: by mail-vs1-xe2e.google.com with SMTP id u7so2908164vsp.7 for ; Mon, 18 May 2020 11:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dinwoodie.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+hcFsL4aTpyDYHLi0ud/fCFPwtCgnhfLDOC89XR24qs=; b=NdA49U+luoatMKzQYCt+pgxrroCWOnAudrG1mWSYo1gCn8keyecMfFtCuf0SDrb9Ra RiRDUgpKlEr7DjAkaUPqx6vZyqcQ1q1U8Sxhnu7mnfkeX+Rv0ugls8+QUd3qEqVriQkI kcr8f21MspIlQqZeSoqlijL/vX7tR4ZH6skGw= 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; bh=+hcFsL4aTpyDYHLi0ud/fCFPwtCgnhfLDOC89XR24qs=; b=pd5W3Ubp0OPLrGLcFPI+dhPGdQskWHcVOja5P3K502+n/q7jyOF4kNyPlrbXIE/2A0 klNlZ3zBAXYJxphnJAybj5QxwHzYS1XBZXYsCJd3nEwbF1rHApJ+ZtKfuDdKtfl1htqe 3U87z9BZ1YKw1GPuoQZER6VXrtuVIq6m4hTSgC0MWigJxdzNc4/lZXtfE7IZBB5STp3I iRPF7ekaJr4YyJEjhg8FT8eEnryS6kqn8aNe7KSxkUMtrMh+jA8VyjY/X2+BJg9czvB9 gPnjtBm5NFW/vJcN1jPaOrS545ts7qrgBHOq7fTZxUkm2POqdKFPq/UsLc/AUVxWpPiS DcRQ== X-Gm-Message-State: AOAM533QrjRcY4nT6xzvkZNMtcquUVlSmICT6xXw6ka2enj1moSnzNX0 z/VlBKIpPKnBoBIG51yOoOD0IVYTtIcY/r/xyeOom27f2yI= X-Google-Smtp-Source: ABdhPJxEzziRXbtizRDdnOgcjMEn4PdJ8gI+PyeL/j+/ZJaObA50CdHqMPtDrcnUslTIAP1GekKc0TSmmIKyjosqHPo= X-Received: by 2002:a67:de0a:: with SMTP id q10mr12458531vsk.138.1589825018434; Mon, 18 May 2020 11:03:38 -0700 (PDT) MIME-Version: 1.0 References: <4319b2cc-07c0-8739-f87d-2c2cebbecae7@jeffunit.com> <1975574327.20200518185545@yandex.ru> In-Reply-To: From: Adam Dinwoodie Date: Mon, 18 May 2020 19:03:00 +0100 Message-ID: Subject: Re: wildcards don't work in directory with files with odd characters To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2020 18:03:40 -0000 On Mon, 18 May 2020 at 17:21, jeff wrote: > > On 5/18/2020 8:55 AM, Andrey Repin wrote: > > Greetings, jeff! > > > >> I have a directory that has some files with odd files. > >> I can do a 'ls', successfully. However if I do a 'ls *'' I get: > >> ls: cannot access '*': No such file or directory > >> Here is ls output: > >> 'Highlander-S03E21-Final'$'\303\251''_Part_I-22.mkv' > >> 'Highlander-S03E22-Final'$'\303\251''_Part_II-23.mkv' > >> I am pretty sure this used to work. > >> This is not specific to ls. wc has the same behavior for example. > > Are you trying to run it from Cygwin shell or from some native one, like cmd? > > > I am running from windows 'command prompt' aka cmd. When run from bash > everything seems to work correctly. In which case this is expected behaviour: Cygwin's `ls` expects the shell (e.g. Bash) to expand globs like `*`, but Windows' command prompt expects applications to handle expanding globs (or the Windows equivalents thereof) themselves. When you call a Cygwin command like `ls` directly from the Windows command prompt, Windows passes the arguments as-is to the Cygwin command, and the Cygwin command assumes that the arguments it received are already appropriately expanded. If this was working previously, I can only assume it's because you were calling Windows' `ls` (which I seem to recall exists and is essentially an alias for `dir`), which expects Windows semantics and therefore handles its own expansions. HTH Adam