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!
Advertisement
Posted on April 7, 2011, in mac. Bookmark the permalink. 4 Comments.
You don’t say whether the partition was formatted to be case-sensitive or not!
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.
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.
$ 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.