Skip navigation

Snow Leopard and case sensitivity

1421 Views 6 Replies Latest reply: Jan 10, 2014 3:53 PM by Strolls RSS
ChesterPerry Calculating status...
Currently Being Moderated
Apr 30, 2013 2:31 AM

Hello,

 

I am a newbie, (so forgive me) but I notice something weird.

 

When I type a file name on my linux box, I have to comply to case sensitivity.

 

user@linux:~$ mkdir Test

user@linux:~$ cd test

-bash: cd: test: No such file or directory

user@linux:~$  cd TEST

-bash: cd: TEST: No such file or directory

user@linux:~$  cd Test/

user@linux:~/Test$

 

The same does not apply to my mac box:

 

mac:~ user$ mkdir Test

mac:~ user$ cd test

mac:test user$ cd ..

mac:~ user$ cd TEST

mac:TEST user$ cd ..

mac:~ user$ cd Test

mact:Test user$

 

I can type the name TEST in whatever case I want, the prompt will move to the same folder. The same happens to file name. If I try to copy file.txt or FILE.TXT, the command will affect to the same file.

 

Why this happens? How can I fix this? Or maybe it is correct and I should not ask this?

 

ChesterPerry

 

Here

MacBook Pro, Mac OS X (10.6.8)
  • Eric Ross Level 6 Level 6 (11,650 points)
    Currently Being Moderated
    Apr 30, 2013 2:58 AM (in response to ChesterPerry)

    HFS+ (the Mac filesystem) is usually configured to be case insensitive but case preserving. This means that the file system will consider foo and FoO to be the same, but when you create a new file it will remember which letters where capitalized and which were not.

     

     

    When you format a disk with HFS+ you can chose whether the file system should case sensitive or not. If you chose to format with UFS (Unix FileSystem) it is always case sensitive, AFAIK.

     

    Take a look at this link, http://apple.stackexchange.com/questions/22297/is-bash-in-osx-case-insensitive

  • BobHarris Level 6 Level 6 (12,505 points)
    Currently Being Moderated
    Apr 30, 2013 5:56 AM (in response to ChesterPerry)

    A few other Linux/Unix vs Mac OS X things to keep in mind.

     

    A) DO NOT make your boot file system Case Sensitive, as Mac OS X will stop working correctly.  If you want an external disk case sensitive that is fine, although some Mac OS X apps may not behave correct if they are accessing stuff on that case sensitive drive.

     

    B) when typing file names at the shell prompt, if you enter the entire name, the shell will ask the file system to open the file and since the file system is case insensitive, it will be opened no matter what capitalization you use.

     

    HOWEVER, if you use wildcards to access files, now the 'bash' shell is looking for the file, and the 'bash' shell DOES honor case sensitive matching.  So if you are not using the correct upper/lower case in your wildcard lookup, the files will not be found.

     

    This all comes down to the component used to do the lookup.

     

    You may not have noticed this anomoly yet, but if you spend enough time playing in both the Linux/Unix world command line and the Mac OS X command line, it will happen to you eventually.

  • Kurt Lang Level 7 Level 7 (31,490 points)
    Currently Being Moderated
    Apr 30, 2013 1:58 PM (in response to ChesterPerry)

    Also, a fair number of software titles won't work, or even install on a case sensitive system. Adobe's products are one such group.

  • Strolls Level 1 Level 1 (50 points)
    Currently Being Moderated
    Jan 10, 2014 3:53 PM (in response to BobHarris)
    A) DO NOT make your boot file system Case Sensitive, as Mac OS X will stop working correctly.

     

    Sorry for the late reply, but the above statement is rubbish.

     

    As long as 10.4 or 10.5, it's been just fine to use case-sensitivity on Mac boot drives, as far Mac OS X itself is concerned (and I'm sure all Apple apps).

     

    I know, because I have tried it. Top comment on this rant is by a guy, Ned Deily, who claims to have been using case-sensitive HFS+ for 5 years.


    However I don't use a case-sensitive fs myself, and I would probably recommend against doing so, because some legacy apps can throw a wobbly when you do. Presumably the code in one part of their application writes "FileName" and another part searches for the same file, referring to it as "filename".

     

    Many Adobe programs fall into this category of legacy apps that misbehave on case-sensitive HFS  - it was an installation of the Photoshop / Illustrator suite that caused me to stop using case-sensitivity.

     

    Developers should choose case-sensitive for their drives, and we should be clear that if an app fails to work on case-sensitive HFS, it's the fault of the developer, not Apple.

     

    A) DO NOT make your boot file system Case Sensitive, as Mac OS X will stop working correctly.

     

    As someone who is a bit technically proficiant in other operating systems it's statements like this which give Mac "power users" and self-proclaimed Mac "techies" a bad name. You have 7000 posts on this forum, it looks you're recently making 10 posts a day helping people, and you make statements which are caegorically and provably wrong.

     

    Just to get some of the other myths and rose-fertiliser out the way: no, it's not necessary to "repair disk permissions" once per week or as first reponse to every problem; you don't need to leave 25% of the drive free, and yes, Macs do suffer from file fragmentation.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.