Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: Create a case-sensitive HFS+ disk System
Jeff F. emailed me with a pointer to a hint on codepoetry that, among other things, explains how to create a case-sensitive HFS+ disk. There's not a lot of detail there, and I have not tried this one myself, so if you proceed, please (a) make sure you have backups, and (b) feel free to share your experience in the comments to this hint!

The codepoetry site has a nice collection of OS X tips, and features some really nice CSS-based page layout. There's also a story (at the end of the first page) pointing out some new features in the Cocoa text-handling engine in Panther -- including colored single and double underlines, text shadows with adjustable offsets, fuzziness, and slant, automatic fractions, and much more. Very interesting reading!
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[21,445 views]  

10.3: Create a case-sensitive HFS+ disk | 19 comments | Create New Account
Click here to return to the '10.3: Create a case-sensitive HFS+ disk' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Create a case-sensitive HFS+ disk
Authored by: aranor on Oct 28, '03 02:14:40AM

Thanks for the pointer. That article about the new Text Services is really good.



[ Reply to This | # ]
10.3: Create a case-sensitive HFS+ disk
Authored by: aranor on Oct 28, '03 02:23:11AM
Anybody use iSeek? Well, here's a search link for codepoetry.net.

[ Reply to This | # ]
why???
Authored by: paulio on Oct 28, '03 03:20:26AM
Why would you want to do this? The one thing I always hated about Unix was the case sensitive file system. I know it might make some ported Unix programs be more compatible but still...

For those of you who don't know, a case sensitive file system makes the following file names completely different files, that is, you can have a folder with both of these files and each would be different:

MyDocument
mydocument

Annoying and confusing.

Mac OS (and Windows) would consider these filenames to be the same.

[ Reply to This | # ]

why???
Authored by: aranor on Oct 28, '03 03:21:43AM

Some people like it.

In fact, I've been considering doing it when I repartition my drive. I probably won't, but it might be interesting...



[ Reply to This | # ]
why???
Authored by: ahknight on Oct 28, '03 03:38:14AM

You would not like it, no, but many of us need it. Because Unix has always had case-sensitivity there are some programs that depend on it (Apache being one) and others that it's just plain required (some source distributions have a "makefile" and a "Makefile" among other things).

It may be unintuitive, but it wasn't designed to be. It was designed for utility and function, not form. Putting this in Mac OS Extended means a lot of us can junk UFS (Unbelievably Farkin Slow!) and move to a more native format.

It's a good thing, just not for you. :)



[ Reply to This | # ]
why???
Authored by: j-beda on Jan 21, '04 09:03:53PM
"It may be unintuitive, but it wasn't designed to be. It was designed for utility and function, not form. Putting this in Mac OS Extended means a lot of us can junk UFS (Unbelievably Farkin Slow!) and move to a more native format."

I think it wasn't designed for "utility and function" but rather "ease of implementation". It is much more challenging to build case awareness and insensitivity than it is to build case sensitivity. Since upper/lower case characters are encoded differently, case sensitivity in the file system is automatic - autually getting case-insensitivity takes some real work.

The arguement that case sensitivity adds "utility and function" I think is a false one. The only reason for having a human readable file system in the first place is so that humans can interact with it, and humans generally do not have very strong "case sensitivity", particularly in spoken language. What case sensitivity does add is "legacy support", making it easier to transfer files and applications from systems that are case sensitive. Of course anyone who is writing software that depends on the use of different cases in filenames (file-a.dat and file-A.dat being different data files perhaps?) has serious issues with creating easy-to-maintain code. The extra "flexibility" of a case-sensitive system in my opinion is offset by one that has much more potential errors.

[ Reply to This | # ]

why???
Authored by: Craigthulu on Oct 28, '03 07:52:56AM
Since Windows 95 it has been case sensitive. And there were extensions from third parties that allowed earlier versions do long file names and case sensitivity.

The one thing I dislike about OSX is that it is case insensitive.

I would also like to know why you think the difference between MyDocument and mydocument is "annoying and confusing"? (Other than a bad naming convention).

[ Reply to This | # ]

why???
Authored by: Alrescha on Oct 28, '03 09:31:20AM

maybe your Windows 95 is case sensitive, but mine is not. Nor is my copy of Windows 2000 ('my documents' and 'My Documents' are the same place).

I'm more annoyed by the fact that it's different from machine to machine. I've started to fix this by getting rid of the non-Mac machines... :-)

A.



[ Reply to This | # ]
why???
Authored by: vladimus on Oct 28, '03 02:53:34PM
mine is not. Nor is my copy of Windows 2000 ('my documents' and 'My Documents' are the same place)

Um, "My Documents" and "my documents" being in the same place would make your copy of Windows case-sensitive. Confusing, huh?

[ Reply to This | # ]

What does case sensitive mean?
Authored by: paulio on Oct 28, '03 03:56:19PM

Sorry, I think you missed the point.

Windows 95 does NOT have a case sensitive file system. Neither does NT, Windows 2000, Windows XP, Mac OS 9, or Mac OS X 10.1 thru 10.2.

However, all the above allow you to type in uppper and lower case in filenames. The thing is that the filesystem is NOT case sensitive.



[ Reply to This | # ]
case-aware != case-sensitive
Authored by: Anonymous on Dec 08, '03 03:40:13PM

No. FAT and FAT32 filesystems (and NTFS, for that matter) are exactly like default HFS+: case-aware, but not case-sensitive.

You cannot create two files, "FOO" and "Foo", in the same directory on any of these filesystems.

Having a case-sensitive option for HFS+ is an absolute must-have for real OS X servers.

It's also handy for those of us who like to layout CD-Rom images prior to burning. Some CDs I produce have directories like "index" in the same directory as a file named "INDEX". Have to build those on my BSD box.

No, it is not an option to change the names of these files or directories. In this case the underlying system needs to change to support the workflow, not the other way around.

[ Reply to This | # ]

why???
Authored by: msk on Oct 30, '03 08:16:32AM

Lets say you wish to backup some Unix machines using "rsync -b", lets say that you wish to buy an Apple Xserve and Xserve RAID rather go with some expensive brand that you don't trust (or a no name you don't trust), you get the system set up and you discover that some of the files on the Unix systems you are backing up are of the form "Makefile" and "makefile" in the same directory (for example), well HFS+ can't handle that, then you discover that UFS is limited to 963 GB but your Xserve RAIDs are 1.0.1 TB each, then you partition one Xserve RAID into two UFS partitions, now you move 200 GB from the HFS+ RAID to the new UFS RAID, and now the Xserve crashes and continues to crash anytime you do any large data accesses to the UFS RAID. Try explaining to you boss why you need to spend $500 on a new OS for a machine that you just bought (you spend $13K on a machine and two months later Apple won't let you upgrade the OS without paying full price, obviously they haven't looked at the details of the warranties of other companies selling into that price range, i.e. SGI). Of course this would be all theoretical except I'm living it.

Apple is selling a UNIX system, case-sensitivity is part of UNIX. UNIX servers had better be case-sensitive. Apple's UNIX servers had better be case-sensitive if they don't wished to be called toys again and now OS X is.



[ Reply to This | # ]
10.3: Create a case-sensitive HFS+ disk
Authored by: vpd22 on Oct 28, '03 09:26:33AM

You can do this in Terminal:
sudo diskutil eraseVolume "Case-sensitive HFS+" newvolname volume
man diskutil for more info

the newfs_hfs -s command in Terminal (-s is "case-sensitive flag") does not seem to work.

This is all in Apple's Command Line reference at:
http://www.apple.com/server/pdfs/Command_Line.pdf

[ Reply to This | # ]

10.3: Create a case-sensitive HFS+ disk
Authored by: Gigacorpse on Oct 28, '03 10:45:33AM

Thanks. What I don't see is how I can make use of this when installing to a hard disk.



[ Reply to This | # ]
10.3: Create a case-sensitive HFS+ disk
Authored by: vladimus on Oct 28, '03 02:42:48PM

What you could do, if you have another Mac with FireWire, is boot the machine you want to install to under target disk mode (hold "T" at startup), mount it on another Mac, then format it using this hint.

If you only have an external FireWire drive (or an iPod), you could install the OS on the external drive, then boot from the external drive (hold "option" at startup) to format your internal drive. Obviously, that's a last resort.



[ Reply to This | # ]
10.3: Create a case-sensitive HFS+ disk
Authored by: macmath on Oct 28, '03 02:31:31PM

Thanks for the link to the command line reference at Apple!



[ Reply to This | # ]
10.3: Create a case-sensitive HFS+ disk
Authored by: MadCabbit on Jan 22, '04 01:57:58AM

The -s flag does work, but using newfs_hfs only will not show it as being case-sensitive in diskutil/Disk Utility. I have used the -s flag and tested it, and it works. Try creating a volume that way, then mount it, and attempt to create files named "test" and "TEST" It will let you do this in a case-sensitive FS, but not a case-insensitive one.

diskutil is where I started when looking for information about case-sensitivity initially months ago. This led me to /System/Library/FileSystems/hfs.fs/Contents/Info.plist, to the part the diskutil example uses:


     <key>Case-sensitive HFS+</key>
     <dict>
          <key>FSFormatArguments</key>
          <string>-s -J</string>
          <key>FSFormatContentMask</key>
          <string>Apple_HFSX</string>
          <key>FSFormatExecutable</key>
          <string>../../../../../../sbin/newfs_hfs</string>
          ...
          <key>FSName</key>
          <string>Mac OS Extended (Case-sensitive/Journaled)</string>
          ...
     </dict>

(non-relevant parts, such a FS size limits, stripped out for clarity)

This information led me to hfs_fs -s -J in the first place, since it what diskutil calls to actually create the volume.

It appears, based on that last , that diskutil stores FSName somewhere that it (and the GUI equivalent) uses to identify it as case-sensitive. However, it appears that they are otherwise the same. Doing a "Get Info" on a volume created each way reports "Mac OS (Extended)" as the Format regardless. mount also shows the format as "(local, journaled)" in both cases, so outside of diskutil/Disk Utility, the OS seems to see the volume as HFS+ journaled, but is unable to determine that its case-sensitive.

[ Reply to This | # ]
10.3: Create a case-sensitive HFS+ disk
Authored by: otomo on Jan 21, '04 10:12:36PM

Well spoken language might have no case. But not every language when written has the same luxury.

Take German for example, Weiss vs weiss. One is a adverb or adjective. The other is the conjugated form of wissen (to know).

Now you would probably think that a file named Weiss and one named weiss would be the same. But in German, capitalization is quite important. Capitalize one thing, and you change alot more than you imagine.

Starting to see why case sensitivity is a good thing?

Once you move out of the realm of ye olde english, alot of things start to change. You cannot make the assumption that AABB is the same as AABb.

(I am using these examples just to demonstate a point, I am still learning German. English is my main language.)

Agree or disagree, case sensitivity will always be a good idea. For the only reason that a != A ever, this continues with every letter you can come up with, umlauted or not, diacritical mark or not.



[ Reply to This | # ]
For the record...
Authored by: Whosawhatsis on Jan 21, '04 10:46:55PM

Weiss is the color white (noun), not an adjective or adverb.

---
I was offered a penny for my thoughts, so I gave my two cents... I got ripped off.



[ Reply to This | # ]