- Generate a dircolors file
$ dircolors -p > ~/.dircolors
- Edit the ~/.dircolors to edit the OTHERS_WRITABLE entry. Switch the foreground and background colors. See colors here http://ascii-table.com/ansi-escape-sequences.php
OTHER_WRITABLE 32;40 # dir that is other-writable (o+w) and not sticky
Ref: https://unix.stackexchange.com/questions/94498/what-causes-this-green-background-in-ls-output
- eval the dircolors to test
$ eval "$(dircolors ~/.dircolors)"
- To make it permanent add the eval to /etc/zsh/zshrc
# Process the dircolors from the home dir
if [[ ! -z "${HOME}/.dircolors" ]]; then
eval `dircolors ${HOME}/.dircolors`
fi