public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
@ 2011-05-26 18:29 Lee Rothstein
  2011-05-26 19:36 ` Christopher Faylor
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Rothstein @ 2011-05-26 18:29 UTC (permalink / raw)
  To: Cygwin, eMail List

Issue: Possible confusing consequences of CYGWIN variable option:
glob:noignorecase

What follows is an edited transcript of my confusion about trying
to find the command "xwin" (and eventual resolution), having
forgotten about its capitalization. More specifically, I was
trying to figure out if it was a binary or a script (not having
used X in the last year, or so).

BTW, the reason I had glob:noignorecase set was to catch
capitalization errors on HTML file names I develop for a
LAMP server.

The transcript, however, indicates the option will not achieve my
aim.
--
/ $ cd /bin

/bin $ echo $CYGWIN
tty title nodosfilewarning glob:noignorecase winsymlinks ntsec

/bin $ type xwin
/bin/xwin

/bin $ which xwin
/bin/xwin

/bin $ ls -l xwin
-rwxrwx--- 1 lr root 2080270 Apr 22 14:45 xwin

/bin $ ls -l xwin*
-rwxr-xr-x 1 lr root  24590 Oct 14  2009 xwininfo.exe
-rwxr-xr-x 1 lr root 172544 Jan 19  2009 xwinwm.exe

# 'rwhich' is a case insensitive regex command finder script,
# I wrote, not a part of the Cygwin distribution

/bin $ rwhich $ rwhich xwin
/local/Scripts/start_xwin.old
/bin/dmxwininfo.exe
/bin/lyxwin.exe
/bin/startxwin.exe
/bin/XWin.exe
/bin/xwininfo.exe
/bin/xwinwm.exe

/bin $ ls -l XWin*
-rwxrwx--- 1 lr root 2080270 Apr 22 14:45 XWin.exe

/bin $ xwin
--
<Successfully starts X Windows>
--
And, yes, had I thought of it first, I could have used 'file':

/bin $ file xwin
xwin: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for 
MS Windows

but the capitalization issue remains.

Finally, I am aware of the change that can be made to the
registry that will make the file system case sensitive, but I've
been burned in the past by non-standard changes to the registry,
and will avoid that.

BTW, it's little excursions like this that make me value Cygwin
more, not less. Creating the illusion of a coherent *NIX
environment on Windows is non-trivial. Thanks, Cygwin developers.

Lee




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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-26 18:29 file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual? Lee Rothstein
@ 2011-05-26 19:36 ` Christopher Faylor
  2011-05-26 19:58   ` Lee D. Rothstein
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2011-05-26 19:36 UTC (permalink / raw)
  To: cygwin

On Thu, May 26, 2011 at 02:28:53PM -0400, Lee Rothstein wrote:
>Issue: Possible confusing consequences of CYGWIN variable option:
>glob:noignorecase
>
>What follows is an edited transcript of my confusion about trying
>to find the command "xwin" (and eventual resolution), having
>forgotten about its capitalization. More specifically, I was
>trying to figure out if it was a binary or a script (not having
>used X in the last year, or so).
>
>BTW, the reason I had glob:noignorecase set was to catch
>capitalization errors on HTML file names I develop for a
>LAMP server.

Re: http://cygwin.com/cygwin-ug-net/using-cygwinenv.html

  (no)glob[:ignorecase] - if set, command line arguments containing
  UNIX-style file wildcard characters (brackets, question mark, asterisk,
  escaped with \) are expanded into lists of files that match those
  wildcards.  This is applicable only to programs running from a DOS
  command line prompt.  Default is set.

There was no DOS command line prompt in anything below.

cgf

>The transcript, however, indicates the option will not achieve my
>aim.
>--
>/ $ cd /bin
>
>/bin $ echo $CYGWIN
>tty title nodosfilewarning glob:noignorecase winsymlinks ntsec
>
>/bin $ type xwin
>/bin/xwin
>
>/bin $ which xwin
>/bin/xwin
>
>/bin $ ls -l xwin
>-rwxrwx--- 1 lr root 2080270 Apr 22 14:45 xwin
>
>/bin $ ls -l xwin*
>-rwxr-xr-x 1 lr root  24590 Oct 14  2009 xwininfo.exe
>-rwxr-xr-x 1 lr root 172544 Jan 19  2009 xwinwm.exe
>
># 'rwhich' is a case insensitive regex command finder script,
># I wrote, not a part of the Cygwin distribution
>
>/bin $ rwhich $ rwhich xwin
>/local/Scripts/start_xwin.old
>/bin/dmxwininfo.exe
>/bin/lyxwin.exe
>/bin/startxwin.exe
>/bin/XWin.exe
>/bin/xwininfo.exe
>/bin/xwinwm.exe
>
>/bin $ ls -l XWin*
>-rwxrwx--- 1 lr root 2080270 Apr 22 14:45 XWin.exe
>
>/bin $ xwin
>--
><Successfully starts X Windows>
>--
>And, yes, had I thought of it first, I could have used 'file':
>
>/bin $ file xwin
>xwin: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for 
>MS Windows
>
>but the capitalization issue remains.
>
>Finally, I am aware of the change that can be made to the
>registry that will make the file system case sensitive, but I've
>been burned in the past by non-standard changes to the registry,
>and will avoid that.
>
>BTW, it's little excursions like this that make me value Cygwin
>more, not less. Creating the illusion of a coherent *NIX
>environment on Windows is non-trivial. Thanks, Cygwin developers.
>
>Lee
>
>
>
>
>--
>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
>
>

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-26 19:36 ` Christopher Faylor
@ 2011-05-26 19:58   ` Lee D. Rothstein
  2011-05-27  5:30     ` Corinna Vinschen
  0 siblings, 1 reply; 11+ messages in thread
From: Lee D. Rothstein @ 2011-05-26 19:58 UTC (permalink / raw)
  To: cygwin

On 5/26/2011 3:35 PM, Christopher Faylor wrote:
> On Thu, May 26, 2011 at 02:28:53PM -0400, Lee Rothstein wrote:
>> Issue: Possible confusing consequences of CYGWIN variable option:
>> glob:noignorecase
>>
>> What follows is an edited transcript of my confusion about trying
>> to find the command "xwin" (and eventual resolution), having
>> forgotten about its capitalization. More specifically, I was
>> trying to figure out if it was a binary or a script (not having
>> used X in the last year, or so).
>>
>> BTW, the reason I had glob:noignorecase set was to catch
>> capitalization errors on HTML file names I develop for a
>> LAMP server.
> Re: http://cygwin.com/cygwin-ug-net/using-cygwinenv.html
>
>    (no)glob[:ignorecase] - if set, command line arguments containing
>    UNIX-style file wildcard characters (brackets, question mark, asterisk,
>    escaped with \) are expanded into lists of files that match those
>    wildcards.  This is applicable only to programs running from a DOS
>    command line prompt.  Default is set.
>
> There was no DOS command line prompt in anything below.
>
True. So, you're saying that 'glob:noignorecase' had no effect on
the commands executed. Then the issue that the transcript reveals
is that in Cygwin, case sensitivity only affects filename specs
if globbing is used. That may, in fact, have been covered somewhere
in the documentation. (?) The transcript makes clear the dramatic
and confusing effects this can have.

But, then, I'm *sure* I'm /more/ easily confused than you. :-|, ;-)
Just like lots of other users.

> cgf
>
>> The transcript, however, indicates the option will not achieve my
>> aim.
>> --
>> / $ cd /bin
>>
>> /bin $ echo $CYGWIN
>> tty title nodosfilewarning glob:noignorecase winsymlinks ntsec
>>
>> /bin $ type xwin
>> /bin/xwin
>>
>> /bin $ which xwin
>> /bin/xwin
>>
>> /bin $ ls -l xwin
>> -rwxrwx--- 1 lr root 2080270 Apr 22 14:45 xwin
>>
>> /bin $ ls -l xwin*
>> -rwxr-xr-x 1 lr root  24590 Oct 14  2009 xwininfo.exe
>> -rwxr-xr-x 1 lr root 172544 Jan 19  2009 xwinwm.exe
>>
>> # 'rwhich' is a case insensitive regex command finder script,
>> # I wrote, not a part of the Cygwin distribution
>>
>> /bin $ rwhich $ rwhich xwin
>> /local/Scripts/start_xwin.old
>> /bin/dmxwininfo.exe
>> /bin/lyxwin.exe
>> /bin/startxwin.exe
>> /bin/XWin.exe
>> /bin/xwininfo.exe
>> /bin/xwinwm.exe
>>
>> /bin $ ls -l XWin*
>> -rwxrwx--- 1 lr root 2080270 Apr 22 14:45 XWin.exe
>>
>> /bin $ xwin
>> --
>> <Successfully starts X Windows>
>> --
>> And, yes, had I thought of it first, I could have used 'file':
>>
>> /bin $ file xwin
>> xwin: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for
>> MS Windows
>>
>> but the capitalization issue remains.
>>
>> Finally, I am aware of the change that can be made to the
>> registry that will make the file system case sensitive, but I've
>> been burned in the past by non-standard changes to the registry,
>> and will avoid that.
>>
>> BTW, it's little excursions like this that make me value Cygwin
>> more, not less. Creating the illusion of a coherent *NIX
>> environment on Windows is non-trivial. Thanks, Cygwin developers.
>>
>> Lee
>>
>>
>>
>>
>> --
>> 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
>>
>>
> --
> 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
>
>


-- 
I yink ergo I yam. -- P. Eye

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-26 19:58   ` Lee D. Rothstein
@ 2011-05-27  5:30     ` Corinna Vinschen
  2011-05-27 15:53       ` File Name Case Sensitivity & Globbing! Was: " Lee D. Rothstein
  0 siblings, 1 reply; 11+ messages in thread
From: Corinna Vinschen @ 2011-05-27  5:30 UTC (permalink / raw)
  To: cygwin

On May 26 15:57, Lee D. Rothstein wrote:
> On 5/26/2011 3:35 PM, Christopher Faylor wrote:
> >On Thu, May 26, 2011 at 02:28:53PM -0400, Lee Rothstein wrote:
> >>Issue: Possible confusing consequences of CYGWIN variable option:
> >>glob:noignorecase
> >>
> >>What follows is an edited transcript of my confusion about trying
> >>to find the command "xwin" (and eventual resolution), having
> >>forgotten about its capitalization. More specifically, I was
> >>trying to figure out if it was a binary or a script (not having
> >>used X in the last year, or so).
> >>
> >>BTW, the reason I had glob:noignorecase set was to catch
> >>capitalization errors on HTML file names I develop for a
> >>LAMP server.
> >Re: http://cygwin.com/cygwin-ug-net/using-cygwinenv.html
> >
> >   (no)glob[:ignorecase] - if set, command line arguments containing
> >   UNIX-style file wildcard characters (brackets, question mark, asterisk,
> >   escaped with \) are expanded into lists of files that match those
> >   wildcards.  This is applicable only to programs running from a DOS
> >   command line prompt.  Default is set.
> >
> >There was no DOS command line prompt in anything below.
> >
> True. So, you're saying that 'glob:noignorecase' had no effect on
> the commands executed. Then the issue that the transcript reveals
> is that in Cygwin, case sensitivity only affects filename specs
> if globbing is used. That may, in fact, have been covered somewhere
> in the documentation. (?)

You got that wrong.  The CYGWIN=glob:... option only affects how
globbing is performed on the command line arguments if the Cygwin
process has been started from a native Windows process.  Full stop.

Now, actual filename case sensitivity is an entirely different issue.
This is handled by a registry setting, the ability of the underlying
filesystems to handle filenames case sesitive, and the settings of
the Cygwin mount point:

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


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-27  5:30     ` Corinna Vinschen
@ 2011-05-27 15:53       ` Lee D. Rothstein
  2011-05-27 16:12         ` Corinna Vinschen
  2011-05-27 17:39         ` Thorsten Kampe
  0 siblings, 2 replies; 11+ messages in thread
From: Lee D. Rothstein @ 2011-05-27 15:53 UTC (permalink / raw)
  To: cygwin

 > You got that wrong. The CYGWIN=glob:... option only affects how
 > globbing is performed on the command line arguments if the Cygwin
 > process has been started from a native Windows process.  Full stop.

I acknowledged *my* MISTAKE. I do so again.

 > Now, actual filename case sensitivity is an entirely different issue.
 > This is handled by a registry setting, the ability of the underlying
 > filesystems to handle filenames case sesitive, and the settings of
 > the Cygwin mount point:
 >
 > 
http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
 > http://cygwin.com/cygwin-ug-net/using.html#mount-table

I acknowledged this point as well in my initial post, and why I reject it.

The point remains:

   Globbing is case sensitive while full command name
     invocation/full filename use is not. And, you may never have
     been confused by that, but I maintain it's very confusing. I'm
     not asking that it be "fixed", I'm asking that it be carefully
     documented, and I'm not asking anyone but me to do it. If it is
     so documented, I missed it. And, I read and reread that part of
     the manual before posting both times.

I offered an example session transcript that made that perfectly
clear, and I am willing to write that up however you want it.
Thus far, you've made clear you don't want it. No further replies
will be required if my last "read" is correct.


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-27 15:53       ` File Name Case Sensitivity & Globbing! Was: " Lee D. Rothstein
@ 2011-05-27 16:12         ` Corinna Vinschen
  2011-05-27 17:39         ` Thorsten Kampe
  1 sibling, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2011-05-27 16:12 UTC (permalink / raw)
  To: cygwin

On May 27 11:53, Lee D. Rothstein wrote:
> > You got that wrong. The CYGWIN=glob:... option only affects how
> > globbing is performed on the command line arguments if the Cygwin
> > process has been started from a native Windows process.  Full stop.
> 
> I acknowledged *my* MISTAKE. I do so again.

So actually I got it wrong.

> The point remains:
> 
>   Globbing is case sensitive while full command name
>     invocation/full filename use is not. And, you may never have
>     been confused by that, but I maintain it's very confusing. I'm
>     not asking that it be "fixed", I'm asking that it be carefully
>     documented, and I'm not asking anyone but me to do it. If it is
>     so documented, I missed it. And, I read and reread that part of
>     the manual before posting both times.

If anybody says our documentation is lacking, I'm the last to deny it.
If you feel up to the task, patches to the documentation are more
than welcome.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-27 15:53       ` File Name Case Sensitivity & Globbing! Was: " Lee D. Rothstein
  2011-05-27 16:12         ` Corinna Vinschen
@ 2011-05-27 17:39         ` Thorsten Kampe
  2011-05-27 21:36           ` Edward McGuire
  1 sibling, 1 reply; 11+ messages in thread
From: Thorsten Kampe @ 2011-05-27 17:39 UTC (permalink / raw)
  To: cygwin

* Lee D. Rothstein (Fri, 27 May 2011 11:53:16 -0400)
> Globbing is case sensitive while full command name invocation/full
> filename use is not. And, you may never have been confused by that,
> but I maintain it's very confusing.

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").

Thorsten
[1] http://www.cygwin.com/ml/cygwin/2003-02/msg01005.html


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-27 17:39         ` Thorsten Kampe
@ 2011-05-27 21:36           ` Edward McGuire
  2011-05-27 22:46             ` Thorsten Kampe
  2011-05-28  7:51             ` Corinna Vinschen
  0 siblings, 2 replies; 11+ messages in thread
From: Edward McGuire @ 2011-05-27 21:36 UTC (permalink / raw)
  To: cygwin

On Fri, May 27, 2011 at 12:38, Thorsten Kampe
<thorsten@thorstenkampe.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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-27 21:36           ` Edward McGuire
@ 2011-05-27 22:46             ` Thorsten Kampe
  2011-05-28  7:51             ` Corinna Vinschen
  1 sibling, 0 replies; 11+ messages in thread
From: Thorsten Kampe @ 2011-05-27 22:46 UTC (permalink / raw)
  To: cygwin

* Edward McGuire (Fri, 27 May 2011 16:36:06 -0500)
> 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.

Lee begs to differ: "Globbing is case sensitive [while ...]. And, you 
may never have been confused by that, but I maintain it's very 
confusing."

> Here's what confused
> the OP:
> 
> $ ls xwin
> xwin
> $ ls xwIN
> xwIN

Interesting that you know that this is what confused Lee - although he 
doesn't mention it all in his transcript 
(http://permalink.gmane.org/gmane.os.cygwin/126959).
 
Thorsten


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-27 21:36           ` Edward McGuire
  2011-05-27 22:46             ` Thorsten Kampe
@ 2011-05-28  7:51             ` Corinna Vinschen
  2011-05-28 19:03               ` Christopher Faylor
  1 sibling, 1 reply; 11+ messages in thread
From: Corinna Vinschen @ 2011-05-28  7:51 UTC (permalink / raw)
  To: cygwin

On May 27 16:36, Edward McGuire wrote:
> 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.

No, it does not.  *sigh*

I'm not a native English speaker, but it's still frustrating how my
words are misunderstood.  Read again, now with comment:

  "In the Win32 subsystem filenames are only case-preserved, but not
   case-sensitive."
   
Not NTFS.  The Win32 subsystem.  The underlying native NT calls allow to
specify if the object name is treated case-sensitive or case-insensitive.
The Win32 calls are usually calling their underlying NT pendants with
case-insensitivity switched on.  Therefore you only get a case-insensitive
behaviour on the Win32 surface.
   
   "You can't access two files in the same directory which only differ by
   case,  [...]"

That's just an example.

  "While NTFS (and some remote filesystems) support case-sensitivity, [...]"

Yes, they do.  The NTFS driver is case-sensitive.  This is obviously
used by the POSIX subsystem (Interix/SFU/SUA).  There is *no* reason to
forgo case-sensitivity with NTFS other than:

  "[...] the NT kernel starting with Windows XP does not support it by
   default.  Rather, you have to tweak a registry setting and reboot."

That's the only problem.  This registry settings, if set, lets the NT
kernel ignore all requests for case-sensitive behaviour.  It translates
all calls into case-insensitive calls.  Unless...
   
   "For that reason, case-sensitivity can not be supported by Cygwin,
    unless you change that registry value."

That's it.  Just change a registry value and suddenly case-sensitivity is
enabled in the kernel.  Now you can call native NT functions, request
case-sensitive behaviour, and actually get it.  Now, suddenly you can have
three files called "abc", "Abc and "ABC" in the same directory.  On NTFS:

  $ uname -a
  CYGWIN_NT-6.1 vmbert7 1.7.10(0.241/5/3) 2011-05-27 21:05 i686 Cygwin
  $ echo abc > abc
  $ echo Abc > Abc
  $ echo ABC > ABC
  $ cat abc
  abc
  $ cat Abc
  Abc
  $ cat ABC
  ABC

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

This wouldn't be true.  The problem is not Cygwin's readdir, nor
the underlying OS functions scanning directories.  The only problem is
that non-Cygwin apps, which open one of the above three files, will
always open the same one, regardless whether you specify "abc", "Abc",
or "ABC" as filename.  Because, whatever Cygwin does, or the NT kernel,
the native Win32 applications are *still* case-insensitive.

Did I make myself clear now?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File Name Case Sensitivity & Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
  2011-05-28  7:51             ` Corinna Vinschen
@ 2011-05-28 19:03               ` Christopher Faylor
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2011-05-28 19:03 UTC (permalink / raw)
  To: cygwin

On Sat, May 28, 2011 at 09:50:22AM +0200, Corinna Vinschen wrote:
>Did I make myself clear now?

Yep.  Perfectly.

I think the discussion prior to your explication brings new meaning to
the term "case insensitivity".

cgf

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-28 19:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 18:29 file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual? Lee Rothstein
2011-05-26 19:36 ` Christopher Faylor
2011-05-26 19:58   ` Lee D. Rothstein
2011-05-27  5:30     ` Corinna Vinschen
2011-05-27 15:53       ` File Name Case Sensitivity & Globbing! Was: " Lee D. Rothstein
2011-05-27 16:12         ` Corinna Vinschen
2011-05-27 17:39         ` Thorsten Kampe
2011-05-27 21:36           ` Edward McGuire
2011-05-27 22:46             ` Thorsten Kampe
2011-05-28  7:51             ` Corinna Vinschen
2011-05-28 19:03               ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).