coreutils

ls

Change default colors

If you want to change the colours in the coloured output of ls, e.g. to get rid of the flashing red for broken symlinks1, do:

$ dircolors --print-database > ~/.dircolors

Change the following two files:

~/.bashrc

# Change the color for a broken symlink flashing red
# http://linux.overshoot.tv/ticket/6154 
d=~/.dircolors
test -r $d && eval "$(dircolors $d)"

  • 1. A symlink to a file in an un-mounted external drive will be 'broken' without it constituting an actual error.
Syndicate content