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