OS X & Case-Sensitive Unix Commands

phule

Registered
Does OS X recognize such case-sensitive Unix commands as "ls -Al" (minus the quotes) by default or must the drive be re-formated to UFS?
 
... then are you asking whether "pico myproject.txt" and "pico myProject.txt" would be two different things. And they are. OSX is case sensitive (if it wasn't, there would be some major conlicts between the case-sensitive unix core).

HTH,
Ghoser777
 
Originally posted by Ghoser777
... then are you asking whether "pico myproject.txt" and "pico myProject.txt" would be two different things. And they are. OSX is case sensitive (if it wasn't, there would be some major conlicts between the case-sensitive unix core).

HTH,
Ghoser777

Oh good!! I was asking the question as in your example. My example should have read "ls -aRl" This lists all the files, including hidden, and any sub-directories recursively all in one column.

Bob
 
Traditionally, Unix is case sensitive when referring to everything. The calculation muscle that it takes to convert things to be case insensitive was more many Unix programmers thought was worthwhile. Now with the advent of Unicode and just what constitutes upper and lowercase in foreign languages becomes a bigger issue that the Unix gurus don't want to have to deal with.

Mac OS X allows you to use an HFS+ file system and a UFS filesystem. Thus when you are targeting a file with a unix command on a file you can use either upper or lowercase argument name if you are using an HFS+ file system, but not if you are using UFS.

Some UNIX programs expect the filesystem to be case sensitive because they create two versions of the same file with only capitalization differences to show that one version has been "processed". These sorts of commands will fail on HFS+ disks so if you want to use these programs you must use a UFS file system.

But the "target" isn't what the original questioner asked about. He asked about the commands themselves. If a command is built into the shell then it will be case sensitive because the shell won't try to ask the filesystem if a command by this name exists. But most commands aren't handled by the shell and if the command refers to a program that's run (tree, cal, wc, etc) then it sounds like you could use upper or lower case to type a command name if you are using a HFS+ partition. The shell doesn't care, it's only asking the filesystem for a matching executable. So when it asks HFS+ for an executable with the name "FINGER", HFS+ will see the program "finger" as the same thing as far as it's concerned.

Besides the command name and the arguments there are flags or options. These will absolutely be case sensitive since they have nothing to do with files on your filesystem. They just get passed along as parameters to the program that starts running. Nothing gets in the way in this case.

Note that I'm not on my OSX box at the moment but I'll test this out after work. But that's the logic behind what I think is case sensitive and what is not.
 
Back
Top