Are bash commands on OSX case insensitive? I type "which TR" and it shows /usr/bin/TR, though there is no such binary there. Same thing for other binaries, when capitalized. Or is Terminal.app maybe doing this translation? How do I turn this off?
Is bash in OSX case-insensitive
bashterminal
Related Question
- Terminal.app equivalent of `xterm -e ‘cmd’`
- MacOS – How to undo “export PATH=’/usr/local/bin:$PATH’ >> ~/.bash_profile”
- MacOS – Problems With Terminal (/usr/bin)
- Why I am unable to switch bash to the one installed by homebrew
- MacOS – Paradox in understanding the “order of booting” of programs given by $PATH
- Terminal.app: changing shell behavior problem
- MacOS – sudo: setrlimit(8): Invalid argument after switching Mac OS shell from BASH to ZSH
- Forklift Tools syntax
Best Answer
This is actually a feature of the filesystem of your disk, not bash or Terminal.app.
HFS+ (the Mac filesystem) is usually configured to be case insensitive but case preserving. This means that the file system will consider
foo
andFoO
to be the same, but when you create a new file it will remember which letters where capitalized and which were not.When you format a disk with HFS+ you can chose whether the file system should case sensitive or not. If you chose to format with UFS (Unix FileSystem) it is always case sensitive, AFAIK.
To check whether a disk is case sensitive, run:
For example:
Look for the
Name:
line. If it reads something likeMac OS Extended (Case-sensitive, Journaled)
it means that it is case-sensitive. If it just readsMac OS Extended
(without theCase-sensitive
) then it is only case preserving but not case sensitive.