OS X case insensitive case preserving

From: Richard Moe <rlmoe_at_uclink4.berkeley.edu>
Date: Fri Apr 14 2006 - 09:40:04 PDT

>> The case insensitivity/case preserving behavior of OS X with
>> Journaled HFS+
surprised me.

>> If you have a Mac-extended filesystem
>> then you can do the following, counter to your UNIX expectation:

herbaria4:/ jfp04$ ls XXX
ls: XXX: No such file or directory
herbaria4:/ jfp04$ ls X*
ls: X*: No such file or directory
herbaria4:/ jfp04$ ls xxx
ls: xxx: No such file or directory
herbaria4:/ jfp04$ ls x*
ls: x*: No such file or directory
herbaria4:/ jfp04$ date > XXX
herbaria4:/ jfp04$ cat XXX
Fri Apr 14 09:23:27 PDT 2006
herbaria4:/ jfp04$ cat xxx
Fri Apr 14 09:23:27 PDT 2006
herbaria4:/ jfp04$ ls X*
XXX
herbaria4:/ jfp04$ ls x*
ls: x*: No such file or directory
herbaria4:/ jfp04$ date > xxx
-bash: xxx: cannot overwrite existing file
herbaria4:/ jfp04$ date >> xxx
herbaria4:/ jfp04$ cat XXX
Fri Apr 14 09:23:27 PDT 2006
Fri Apr 14 09:25:01 PDT 2006
herbaria4:/ jfp04$ ls x*
ls: x*: No such file or directory

If you then do this:
cat xxx >> XXX
which you would expect you could do after checking ls x*
you will set up an infinite loop and create a very large file.

This behavior is a good reason to set noclobber. That will protect
you from some of the consequences.

Dick Moe

------------------------------------------------------------------------
The following was automatically added to this message by the list server:

For information about MAGNet, its meetings and events, and its
mailing list, including information on subscribing and unsubscribing,
see the MAGNet Web site at <http://magnet.berkeley.edu/>.
Received on Fri Apr 14 09:44:07 2006

This archive was generated by hypermail 2.1.8 : Fri Apr 14 2006 - 09:44:08 PDT