Wednesday, January 14, 2015

Strange MACOSX behavior ? Really not so !

I was working on unix shell  script for finding and parsing files using the "unix find" and ran across something on my  MACOSX host that I wanted to share & remind you of.

Check this out , 1st up a typical  LINUX DEBIAN HOST

Okay that's simple; "  we touch  5 files name jim with different  character case." 

Using  the unix  find and  "-iname" ( ignore case name  ) and we found the 5 files. Okay this is good and correct behavior what I was expecting to find ( once again excuse the pun )

Okay next up , a  MACOSX 10.10.1 aka Yosemite b14B25

So I'm like scratching my head as to why I can't touch 5 files name Jim & with various character letter case.  Okay maybe this is a BSD thing since MACOSX is grown from the BSD family.

So let's see if a OpenBSD hosts has the same issue ( btw OpenBSD is my favorite OS just to let you know )

( openbsd )


So what I learned today; " is macosx is really screwed up and when testing scripts,  it best to test them on  the actual host you planning to run these on ". I  collaborate with some other mac users to see if  they can shed some light on this and why and we came up with this.

It pertains to the filesystem type of "HFS" and the limitations within the filesystem type, naming construction, etc..... So even a restrictive filesystem like MSdosFAT would not allow you to do  the same.

So after 20+ years using various OSes you still will find your self learning new things or refreshing things you should already have known. Maybe I should buy one of these  books

Ken Felix
NSE ( Network Security Expert) and Route/Switching Engineer.
kfelix  -----a----t---- socpuppets ---dot---com

    ^     ^
=(  *  * )=
       /  \


  1. As far as I know HFS support case sensitive, in OSX case you need to reformat the disk to support that. In Disk Utility, Partition tab, choose MacOS Extended (case-sensitive,journaled). Or you can use 3rd party app.
    I hope this help

  2. Thanks yes we figure it out after looking at the diskutility. I never knew this was the default case with MACOSX.