10

How to create a Case Sensitive file system on a Mac?

Here is a simple test:

echo 'you should see this' > abc ; echo 'not just this twice' > ABC ; cat  abc ABC
you should see this
not just this twice

I'm on Mac version 10.11.1 and even with a "Case Sensitive" filesystem on a DMG image, I get:

not just this twice
not just this twice
3
  • 1
    I can not reproduce your output of "not just this twice" twice on separate lines on a normal Case Sensitive DMG, with or without being Journaled, made using Disk Utility. I get "you should see this" and "not just this twice" on separate lines as expected. BTW never heard such thing as "Case Respecting" filesystem, it's simply "Case Sensitive". Commented Dec 2, 2015 at 1:37
  • I agree it is very odd and used to work. Are you on 10.11.1 ? I only have one choice for Case-Sensitive, the non Journaled version is gone. I rebooted and performed the test again, Disk Utility, new blank image, 100MB, case-sensitive journaled, no partition map (tried both map and no map), name test5. cd /Volumes/test5 then perform the above test. results same line repeated twice.
    – null
    Commented Dec 2, 2015 at 1:48
  • @user3439894 I had the respecting vs sensitive around the wrong way in the question, now fixed. Case Respecting is it will preserve the case of the filename. Case Sensitive is where two different files can exist at the same time that have only capitalisation differences in the filename.
    – null
    Commented Dec 2, 2015 at 1:59

2 Answers 2

5

I have done some digging and found a working answer.

There is a script here.

https://gist.github.com/dixson3/8360571

hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}

Proof

./workspace.sh create
./workspace.sh attach
cd /Volumes/workspace/
echo 'you should see this' > abc ; echo 'not just this twice' > ABC ; cat  abc ABC
you should see this
not just this twice
4
  • 1
    Note: You shouldn't make your primary partition case-respecting. There are a lot of things that'll break in OS X if you do this (apps referring to Foo but case-sensitive saving them and resolve to foo for example).
    – Ian C.
    Commented Dec 2, 2015 at 1:47
  • @IanC. OS X or third-party software?
    – bot47
    Commented Dec 2, 2015 at 5:52
  • OS X is definitely known to not run well on case-respecting partitions.
    – Ian C.
    Commented Dec 2, 2015 at 5:59
  • I did in the past and had no problems. Do you have something citable about it?
    – bot47
    Commented Dec 6, 2015 at 7:55
5

It looks like there is a bug in the newly-rewritten Disk Utility application in El Capitan (as of 10.11.2) where it can't create case-sensitive disk images. As your answer mentioned, you can use the hdiutil command-line tool as a workaround; alternately, in Disk Utilty, you can erase the disk image after creating it, selecting a case-sensitive format.

https://discussions.apple.com/thread/7395900

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .