Re: File Name Case Sensitivity Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
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
Re: File Name Case Sensitivity Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
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
Re: File Name Case Sensitivity Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
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
Re: File Name Case Sensitivity Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
* 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
Re: File Name Case Sensitivity Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
On Fri, May 27, 2011 at 12:38, Thorsten Kampe thors...@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
Re: File Name Case Sensitivity Globbing! Was: file system name case insensitivity issue: Possible inclusion for the FAQ or User Manual?
* 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
RE: file name case sensitivity
Sorry this is getting a bit OT... Shankar Unni wrote: Very interesting. Once you do create such files [...], will regular Windows programs be able to even look at that directory? Or will they choke on those names [...] ? Obviously, you need to do something special to get at the files or there would be no need for such a library. But is this really worse than the alternative, where (for example) writing to nul.c may be silently ignored? Once you've created such a file/directory, you will be able to see it in a directory listing, but you can't use default case-insensitive Win32 calls to get at them directly. Or at least not all the files: you can still open/rename/delete files differing only by case, just one at a time. Microsoft has already added FILE_FLAG_POSIX_SEMANTICS to CreateFile() to allow you to create/open/delete such files, although they didn't go far enough and didn't apply it to other calls such as MoveFile() and CreateDirectory(). I'm hoping CaseWise can fill that gap. As the name implies, the primary purpose of CaseWise is to support mixed cases such as makefile/Makefile. Microsoft has already made a half-hearted attempt at this, so finishing the job should be fair game. The current pre-0.1 implementation of CaseWise doesn't even allow you to create files with names like prn.c and nul.txt, although I did plan to address this before posting it to SourceForge. I'm sure somebody will post a patch ;-) to CaseWise that will allow it to optionally suppress writing of such files. But as I said, this is OT for Cygwin. Even if it is added to Cygwin, it will almost certainly not be the default behavior. But for people like me trying to maintain Cygwin versions of Unix projects, it could be a real boon. -Jerry -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
Gerald S. Williams wrote: [snip] But as I said, this is OT for Cygwin. Even if it is added to Cygwin, it will almost certainly not be the default behavior. But for people like me trying to maintain Cygwin versions of Unix projects, it could be a real boon. Indeed. In my case, it would require modifications to cygwin's CVS tools, to use these special case sensitive semantics. CVS puking on a sync operation was the first sign that anything was amiss for me. Regards, John -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: file name case sensitivity
Shankar Unni wrote: Yes, but in my opinion it could be of use to John Williams because he wanted to case sensitivity in filenames under Cygwin. No, it won't work, because if you remember, he said that he had files with the same name but different case *in the same directory*. This expressly can*not* be handled by any of the Windows filesystems, even NTFS. This isn't entirely true. By specifying POSIX semantics to the CreateFile command, you can create and access multiple files differing only by case in the same directory. They didn't go far enough, since that's only for files and only a few functions support it, but hopefully I'll be able to help there soon... Anyway, even if if were theoretically possible to force NTFS to be case-sensitive (the underlying filesystem does have support for this, though Windows doesn't normally expose it), you're still stuck with other oddities of the Windows filesystem implementation, like the inability to have any file with a base name that is the same as any of their devices (i.e. no /usr/include/con.h or /my/src/aux.c). That's not really a limit of the filesystem. I just created an aux directory using some tools I've been working on. I've also created files with names like PRN (and prn in the same directory). As you may have guessed, I've been working on this problem recently. I just put a request into SourceForge to create a new project: a library I've been calling CaseWise. It's only for Windows NT/2000/XP since it uses the Native API, but I'm hoping to get Cygwin to use it eventually. The library provides direct replacements for Windows API calls (e.g., CaseWiseCreateDirectory replaces CreateDirectory), with both ANSI and Unicode versions. I plan to allow calls to fall back to the original functions on platforms that don't support CaseWise semantics. -Jerry -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
Gerald S. Williams wrote: As you may have guessed, I've been working on this problem recently. I just put a request into SourceForge to create a new project: a library I've been calling CaseWise. It's only for Windows NT/2000/XP since it uses the Native API, but I'm hoping to get Cygwin to use it eventually. The library provides direct replacements for Windows API calls (e.g., CaseWiseCreateDirectory replaces CreateDirectory), with both ANSI and Unicode versions. I plan to allow calls to fall back to the original functions on platforms that don't support CaseWise semantics. Very interesting. Once you do create such files (different case but same case-insensitive value, or files called aux.something or prn.something), will regular Windows programs be able to even look at that directory? Or will they choke on those names (e.g. hang when listing the directory, or when opening the file)? I'd be wary of creating directory contents that can only be handled by special tools. Hopefully once you create these weird files, they will at least be gracefully handled by regular Windows tools, even if it means just something like a cannot open file message. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
* Christopher Faylor (03-02-25 06:06 +0100) On Tue, Feb 25, 2003 at 02:48:05PM +1000, John Williams wrote: Is there a way to enable case sensitivity in filenames under Cygwin? No there isn't. Sorry. What about SET CYGWIN=check_case:strict? Thorsten -- Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory) Content-Transfer-Warning: message contains innuendos not suited for children under the age of 18 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
On Tue, Feb 25, 2003 at 11:09:46AM +0100, Thorsten Kampe wrote: * Christopher Faylor (03-02-25 06:06 +0100) On Tue, Feb 25, 2003 at 02:48:05PM +1000, John Williams wrote: Is there a way to enable case sensitivity in filenames under Cygwin? No there isn't. Sorry. What about SET CYGWIN=check_case:strict? It's a hack. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
* Corinna Vinschen (03-02-25 12:20 +0100) On Tue, Feb 25, 2003 at 11:09:46AM +0100, Thorsten Kampe wrote: * Christopher Faylor (03-02-25 06:06 +0100) On Tue, Feb 25, 2003 at 02:48:05PM +1000, John Williams wrote: Is there a way to enable case sensitivity in filenames under Cygwin? No there isn't. Sorry. What about SET CYGWIN=check_case:strict? It's a hack. I knew you were a hacker... ;-) . But is it working reliably? And if not - why is it mentioned in the Cygwin documentation about the CYGWIN environment variable? Thorsten -- Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory) Content-Transfer-Warning: message contains innuendos not suited for children under the age of 18 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
On Tue, Feb 25, 2003 at 12:42:02PM +0100, Thorsten Kampe wrote: * Corinna Vinschen (03-02-25 12:20 +0100) On Tue, Feb 25, 2003 at 11:09:46AM +0100, Thorsten Kampe wrote: * Christopher Faylor (03-02-25 06:06 +0100) On Tue, Feb 25, 2003 at 02:48:05PM +1000, John Williams wrote: Is there a way to enable case sensitivity in filenames under Cygwin? No there isn't. Sorry. What about SET CYGWIN=check_case:strict? It's a hack. I knew you were a hacker... ;-) . But is it working reliably? And if not - why is it mentioned in the Cygwin documentation about the CYGWIN environment variable? - It's not changing the case insensitivity of the underlying FS. - Therefore it only fakes case insensitivity in the API so it's reliability is restricted. - It's mentioned because it exists. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
* Corinna Vinschen (03-02-25 12:51 +0100) On Tue, Feb 25, 2003 at 12:42:02PM +0100, Thorsten Kampe wrote: * Corinna Vinschen (03-02-25 12:20 +0100) On Tue, Feb 25, 2003 at 11:09:46AM +0100, Thorsten Kampe wrote: * Christopher Faylor (03-02-25 06:06 +0100) On Tue, Feb 25, 2003 at 02:48:05PM +1000, John Williams wrote: Is there a way to enable case sensitivity in filenames under Cygwin? No there isn't. Sorry. What about SET CYGWIN=check_case:strict? It's a hack. I knew you were a hacker... ;-) . But is it working reliably? And if not - why is it mentioned in the Cygwin documentation about the CYGWIN environment variable? - It's not changing the case insensitivity of the underlying FS. Yes, of course. - Therefore it only fakes case insensitivity in the API so it's reliability is restricted. Yes, but in my opinion it could be of use to John Williams because he wanted to case sensitivity in filenames under Cygwin. I don't know, so he might try or not. Thorsten -- Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory) Content-Transfer-Warning: message contains innuendos not suited for children under the age of 18 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
Thorsten Kampe wrote: Yes, but in my opinion it could be of use to John Williams because he wanted to case sensitivity in filenames under Cygwin. No, it won't work, because if you remember, he said that he had files with the same name but different case *in the same directory*. This expressly can*not* be handled by any of the Windows filesystems, even NTFS. The case:strict stuff is only there so that an attempt to open Foo as fOo will fail, and will help if those similarly spelt files are in different directories. But if they are in the same directory, that's not possible. Anyway, even if if were theoretically possible to force NTFS to be case-sensitive (the underlying filesystem does have support for this, though Windows doesn't normally expose it), you're still stuck with other oddities of the Windows filesystem implementation, like the inability to have any file with a base name that is the same as any of their devices (i.e. no /usr/include/con.h or /my/src/aux.c). So there's no way you can *really* pretend you're on a Linux or other POSIX system and get away with it for long.. uClinux will have to be patched for cygwin support. John: time to start your first set of unofficial cygwin patches for uClinux. -- Shankar. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
Shankar Unni wrote: Thorsten Kampe wrote: Yes, but in my opinion it could be of use to John Williams because he wanted to case sensitivity in filenames under Cygwin. No, it won't work, because if you remember, he said that he had files with the same name but different case *in the same directory*. That's correct. I tried the check_case hack and it only goes halfway to what I need. uClinux will have to be patched for cygwin support. John: time to start your first set of unofficial cygwin patches for uClinux. I suppose you are right. I haven't even got the port up and running yet, so the last thing I feel like doing right now is creating another parallel branch in the source tree. I'm basically going to ignore this problem for as long as I can, I've got much bigger fish to fry right now. Thanks, John -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
I'm building a version of uClinux under Cygwin, and for some reason there are a few places where files exist _in the same directory_ having identical names but differences in capitalisation. For example, /include/linux/netfilter/ipv4/ contains files called ipt_dscp.h and ipt_DSCP.h . There are about 10 examples of this within the uClinux source distribution. The file system in question is a Samba mount from a Solaris machine, and I'm running Cygwin 1.3.20 under WinXP. Is there a way to enable case sensitivity in filenames under Cygwin? At the moment things are not looking too good because Cygwin views these names as equivalent, meaning that which ever one is copied in last overwrites the one before. No. You can use the check_case option in the CYGWIN environment variable, but that'll only get you half way to what you want. Take a look at (http://cygwin.com/cygwin-ug-net/using-cygwinenv.html) to see how it works and how to use it. Regards, Elfyn McBratney [EMAIL PROTECTED] www.exposure.org.uk -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: file name case sensitivity
Hi Elfyn, No. You can use the check_case option in the CYGWIN environment variable, but that'll only get you half way to what you want. Take a look at (http://cygwin.com/cygwin-ug-net/using-cygwinenv.html) to see how it works and how to use it. Thanks for that. As you predict, check_case can't undo the evil that is causing my problem in the first place. My loathing goes in equal measures to Microsoft for failing after 20 years to support case-sensitive file names, and whomever it was in the linux dev group who decided it would be a good idea to duplicate some files but only change the filename capitalisation... bleughhh... the conspiracy theorist in me wonders if it was deliberate to kybosh those working under Windows... :O Cheers, John -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/