delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/27/17:36:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,PLING_QUERY,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <ironit$s6g$1@dough.gmane.org>
References: <4DDE9BE5 DOT 90105 AT veritech DOT com> <20110526193553 DOT GB6015 AT ednor DOT casa DOT cgf DOT cx> <4DDEB0BA DOT 9030903 AT veritech DOT com> <20110527052926 DOT GE28752 AT calimero DOT vinschen DOT de> <4DDFC8EC DOT 8060507 AT veritech DOT com> <ironit$s6g$1 AT dough DOT gmane DOT org>
From: Edward McGuire <cygwin DOT com AT metaed DOT com>
Date: Fri, 27 May 2011 16:36:06 -0500
Message-ID: <BANLkTinSRFMSj_dB-aLBDXi9TOqDKrZw3A@mail.gmail.com>
Subject: Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, May 27, 2011 at 12:38, Thorsten Kampe
<thorsten AT thorstenkampe DOT de> wrote:
> This has nothing to do with Cygwin. You are (still[1]) confusing
> Cygwin and your shell. You would hugely benefit from gaining some
> basic knowledge about the tools you've been using since 1979.
>
> Your transcript was done in a shell called "bash". Globbing in
> bash is - by default - case sensitive. If you want to change that,
> read the man page and then set option "nocaseglob" ("shopt -s
> nocaseglob").

The globbing is not where the confusion lies. This globbing:

$ ls xwin*
ls: cannot access xwin*: No such file or directory

works as expected and did not confuse anybody. Here's what confused
the OP:

$ ls xwin
xwin
$ ls xwIN
xwIN

This is unquestionably a normal, Cygwin specific condition, caused
by the semantics of the underlying NTFS, but very confusing to
someone whose experience is with UNIX.

This note:

http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive

warns that you cannot have two filenames in the same directory that
differ only by case, because of NTFS semantics.

It could be improved to warn that because of NTFS semantics there
are also filenames which exist but which Cygwin's readdir() does not
return, and which therefore are truly hidden -- will never show up
in directory listings or globs.

I think this is what the OP was volunteering to do.

Cheers,

MetaEd

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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