Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I get information if my HD format is case sensitive or case insensitive?

I want to make sure my Mac running Mountain Lion has a case sensitive file system.

share|improve this question
2  
As bmike mentioned, using a case sensitive file system is more likely a bad idea -- a number of softwares (most famously from Adobe) will not work on a case sensitive file system. The case sensitive status of the file system is not a 'cool extra feature' for jo random user -- it is something for power users who know what they are doing. For joe random user a case sensitive file system is more likely a liability than not. –  user1256923 Nov 12 '12 at 17:55

7 Answers 7

up vote 11 down vote accepted

You can use terminal to read the File System Personality:

diskutil list /

Look for the fields named below:

   File System Personality:  Journaled HFS+
   Type (Bundle):            hfs
   Name (User Visible):      Mac OS Extended (Journaled)

If the file system is case sensitive, you will see Case-sensitive Journaled HFS in the first pasted line and Mac OS Extended (Case-sensitive, Journaled) in the third.

Disk Utility will also show you this from the info window for any File System it can see.

share|improve this answer
6  
I don't want to discourage you from using case-sensitive file systems, but be aware that most software tests don't do a good job of covering this edge case and most experienced administrators will advise against enabling this on your boot volume due to past bad experiences supporting this configuration. I usually make an external drive or a dmg when I truly need case-sensitivity for cross platform needs or a very specific code base. You may have good reasons for needing this, but I wanted to make sure others are aware that there can be problems with being too sensitive with your file system. –  bmike Nov 12 '12 at 17:31
1  
Yes, i need that for testing web development. Most of hosting use case sensitive. So i want to match it. But like you said: if case sensitive make some software didn't work, seems like case sensitive will be useless :) –  GusDeCooL Nov 13 '12 at 15:10
2  
Yours is actually the only reason I have made either test partitions and/or disk images and chosen a case-sensitive filesystem. I keep my system default, but test development, deployment and scripts on a web root based on the alternate file system's path. I'd also add, I haven't run OS X on case-sensitive FS since Snow Leopard days, so I may just be out of date and afraid for nothing due to past experiences. Sounds like you're well armed to give either scenario a go - dive in or compartmentalize your testing. –  bmike Nov 13 '12 at 16:39
2  
If you need an environment for testing web development, running a virtual machine is an alternative to consider as well, since there might be other quirks and differences between your Mac and the environment on production servers. Have a look at VirtualBox + Vagrant. –  Gerry Nov 15 '12 at 4:44
2  
Note, In OS X 10.8.x (Mountain Lion) I had to do diskutil info as list did not show the expected information. –  Nick Feb 7 '13 at 13:40

run diskutil info <device> and your answer will be shown.

File System Personality will reflect one of the known personalities.

If you see: File System Personality: Journaled HFS+ that means it's case insensitive. To answer your question, you want to see File System Personality: Case-sensitive Journaled HFS+.

share|improve this answer

Jean-François Beauchamp's solution doesn't work properly.
Something like this would be more appropriate:

Testing

touch abc1
touch abC1
ls ab*

Interpreting Results

  • 1 file - case insensitive
  • 2 files - case sensitive
share|improve this answer
    
Yeah and looking at it further, he edited it to be wrong... –  Grady Player Jun 5 '13 at 19:41

You can do a test in a shell:

  • Open the Terminal
  • Enter the following commands:

    touch abc1
    touch ABC2
    ls a*
    

If the ls command displays both files, abc1 and ABC2, then your drive is case insensitive (i.e. case does not matter). If only abc1 is displayed, then it is case sensitive (i.e. case does matter).

Before you close Terminal, enter rm abc1 and rm ABC2 to clean up after the test.

share|improve this answer
    
An empirical solution - very nice. –  bmike Nov 15 '12 at 4:56
1  
How do abc1 and ABC2 collide? Shouldn't it be abc1 and ABC1? –  getWeberForStackExchange Sep 19 '13 at 19:27
    
@weberwithoneb is correct. This check is a good idea but wrong. Should be ABC1. –  Leopd Nov 7 '13 at 17:12
2  
abc1 and ABC2 are not meant to collide. I could have chosen Allan and armour instead as filenames. it is the ls a* command that will tell you weather the file system is case sensitive. If it is, only armour will be listed using my last example, since there is a lower case letter a in ls a*. However, if the OS is not case sensitive, the ls a* command will list both Allan and armour. –  Jean-François Beauchamp Nov 7 '13 at 23:48
    
Oh of course! Thanks for the clarification. –  getWeberForStackExchange Nov 19 '13 at 23:51

Fastest way is using Terminal.app:

diskutil info /Volumes/NAME-OF-VOLUME

or (if you want to only see the relevant line)

diskutil info /Volumes/NAME-OF-VOLUME | grep 'User Visible'
share|improve this answer

Unfortunately Jean-François Beauchamp's solution that relies on 'ls' doesn't seem to work for me (OS X 10.8.2). I have a case-insensitive file system, but ls still only lists 'abc2'.

What does work for me is:

echo -n This file system is case->tmp; echo -n in>>TMP; echo sensitive>>tmp; cat tmp
share|improve this answer

You can also use Disk Utility to check the partition format. If the format is case-sensitive, it will say so in the format name, otherwise nothing will be indicated.

You can see the menus on this link: http://www.kenstone.net/fcp_homepage/partitioning_tiger.html

Beware that it is not the "Mac" that is case-sensitive or not, it is each partition on your drives.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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