HFS/terminal not case sensitive?

Discussion in 'General Mac Discussion' started by jxyama, Feb 6, 2004.

  1. jxyama macrumors 68040

    jxyama

    Joined:
    Apr 3, 2003
    #1
    my friend just told me about this... HFS is not case sensitive in terminal?

    see the attached image. a directory named "blah" is basically the same as "Blah". under UNIX, these would be different.
     

    Attached Files:

  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    It's not quite that simple...

    HFS [Plus] can be case-sensitive, but is not by default, and as far as I know, can only be enabled (easily?) in Mac OS X Server. Also, commands used in the Terminal application are case sensitive, like 'ls', 'rmdir', and 'mkdir'. What I do know about case-sensitive HFS Plus is that it can only be enabled with a hard drive reformat, unlike journaling.
     
  3. jxyama thread starter macrumors 68040

    jxyama

    Joined:
    Apr 3, 2003
    #3
    interesting... i knew that the commands must be case sensitive - it would be very, very obvious to switchers from UNIX if it wasn't. i was just surprised that the filenames weren't case sensitive...
     
  4. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #4
    Case sensitivity is, ahem, a sensitive matter. Unix file systems were designed to be case sensitive. For example, developers on other Unix platforms would sometimes have both makefile and MAKEFILE files in the same directory. Most filenames were all lowercase, with exceptions for important files such as README. Windows NT, with its NTFS file system, took a different approach: files retain their case setting, meaning the names are stored with the case that was specified when creating them, but filename comparisons are made without regard to case. For example, if you create a file named Macintosh.txt, it is stored that way but compares equal to macintosh.txt and MACINTOSH.TXT and Macintosh.txt. Mac OS X made the same compromise, retaining case but not distinguishing in the Finder. So having both Blah and blah in the same folder would be a problem.

    Windows seems to display initial caps in some cases, even when a file is not created that way. I've noticed this behavior with items in the Start menu.

    Is case-retention with case insensitive comparison a good idea or a bad idea? It doesn't much matter, since the decision has been made. The computer scientist in me says that all comparisons should be case sensitive, as in pure Unix filesystems, but I know that the compromise approach adopted in Mac OS X is the most convenient for most people.

    I've stated facts from memory without actually testing them this morning. If I've got them wrong, please correct me.
     

Share This Page