I have been using Cygwin 32-bit on Windows 7 Professional 64-bit. I had the HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\ObCaseInsensitive registry key set and all has been good: I could get true case-sensitive filename handling, I could create FOO.txt and foo.txt in the same directory.

Now that Cygwin 64-bit is released, I want to try it on Windows 7 Professional 64-bit. It turns out that the ObCaseInsensitive registry key has no effect for Cygwin 64-bit because the key seems to be for the Win32 subsystem only. Subsystem for UNIX-based Applications (SUA) is also not available in Windows 7 Professional 64-bit (Enterprise or Ultimate is required). In fact, I don't even know if having SUA installed would help at all.

Does anybody know if it is possible to get case-sensitive filename handling with Cygwin 64-bit on Windows 7 Professional 64-bit?


Case sensitivity does work on x86_64-cygwin. Remember that on 64-bit Windows systems, there are effectively two registries, one for 32-bit processes and another for 64-bit processes. (In Cygwin, these are represented by /proc/registry32 and /proc/registry64.) Setting the key again with regtool -w and rebooting should fix this for you.

  • Mea culpa. Further tests confirm that the ObCaseInsensitive key does have an effect on Cygwin 64-bit: I could echo 'FOO' > FOO.txt; echo 'bar' > foo.txt and create two different files. The problem seems to be with git. git in Cygwin 64-bit doesn't seem to be patched to have correct case-sensitive filename handling, despite the ObCaseInsensitive registry key having been set. – Kal Aug 16 '13 at 1:46

You could define a function that checks the case of the target directory (without having to change the Windows Registry). This way, I have in ~/.bash_functions file the following code:

unset cd_func2 2> /dev/null
unalias cd 2> /dev/null
cd_func2 () {

    echo $1 | grep -q '^/' && cd $1 && return 0
    for f in `echo $1 | sed -e 's/\// /g'` ; do
        _NEW_PATH=$(ls -a | grep -i ^"$f"$)
        [ "$_NEW_PATH" ] && cd $_NEW_PATH && continue
        echo "Directori inexistent $f" && return 1

alias cd=cd_func2

EDIT: More general parameter handling.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.