In Mac OS X, when I do ls
the binary files have red color, how change this color to green?
Similar to other Unix.
check out the .dircolors file in your home directory, or create one. Then according to this blog, you'll have to do some extra magic to your bash config get it working on OSX
http://mattbsoftware.blogspot.com/2009/04/colerful-ls-dircolors-on-mac.html
There is a much simpler answer: add the following two lines to the .profile
file (for bash
) or .zprofile
(for zsh
) in your home directory
export CLICOLOR=1
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
Create the relevant file with just these lines in it, if it does not exist (it does not need to be marked executable).
Open a new shell to see the changes.