Minefield File System

Just hit a nasty gotcha on Mac OS.  Specifically 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386.  The filesystem is schizophrenic over case sensitivity!

Of course we expect case-sensitivity in normal use.  But watch:

$ scp remote:/path/to/File .
File                                   100% 3086     3.0KB/s   00:00   
$ scp remote:/path/to/file .
file                                   100% 3757     3.7KB/s   00:00
$ ls
File
$ wc File
125     237    3757 File
$

The second file has overwritten the first, and taken its name.  Ouch!

Posted on April 7, 2011, in mac. Bookmark the permalink. 4 Comments.

  1. You don’t say whether the partition was formatted to be case-sensitive or not!

  2. This is a Mac. Onna Macbook! I don’t partition or format anything, I just take what comes.

    If it had been VMS or DOS/Windows, I’d’ve expected case-insensitivity. No surprise – no gotcha.

  3. There’s no gotcha. HFS+ is case insensitive by default. This has always been the case, both pre-OS X and since OS X 10.0.

  4. $ ls f*
    ls: f*: No such file or directory

    Looks case-sensitive to me. VMS/DOS/Windows would’ve done the decent case-insensitive thing and listed File.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: