More information about the Underscore mailing list

[_] case sensitive file names osx/ debian/ apache

Tom Gidden tom at gidden.net
Mon Dec 3 11:24:58 GMT 2007

On 3 Dec 2007, at 10:58, Richard Price wrote:

>>   As far as I know, the default OS X installation has a
>> case-insensitive formatted file system.
>
> This is correct - OS X by default uses a non case sensitive
> filesystem, but perversely Bash is still case sensitive so it *looks*
> like the filesystem is case sensitive when you are at a command
> prompt.


Yep... the default filesystem setup in OS X is "case preserving", but  
not "case sensitive".  It'll remember the case and display it  
correctly, but it won't pay that much attention to it.

System calls, such as open(2), are case-insensitive.

HOWEVER, since readdir, etc. returns case-preserved filenames, then  
functions on those names implemented in an external program, such as  
ls, find, bash or any of the other shells, won't do tab completion or  
globbing (for example) in a case-insensitive way, without extra  
tweaks.  So, things like "mv f* ../" won't work on a file called "Foo".


In general, it's far safer to make case unambiguous and uniform in all  
projects.  It gets very confusing when there are two files with the  
same name apart from case, such as "Makefile" and "makefile" in some  
previous versions of various GNU packages.

Oh, and although OS X can be set up with case sensitivity enabled,  
it's considered a Bad Idea, and only appropriate if you have very  
specific reasons and you fully understand the pros and cons.  Same as  
selecting "Unix File System" (ie. ufs) as your default FS type in OS X.

Tom

-- 
Tom Gidden
http://gidden.net/tom/