(Preface: I'm brand new to Linux.)
Problem
I'm trying to change to colors of the file system in the bash shell. I've altered my .bashrc
file according to:
http://ubuntuforums.org/showthread.php?t=41538.
But on rebooting the shell or sourcing the .bashrc
I get the error message:
dircolors -b : command not found
What have I done wrong?
Set-Up and So Far
I'm running a fresh Ubuntu Server 13.04.
I've created a .dir_colors
file in my home directory using:
dircolors -p > ~/.dircolors
I've then altered my .bashrc to look like this:
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi
I also have force_color_prompt
enabled
EDIT: printout of <~/.bashrc grep dircolors | od -t x1
0000000 20 20 20 20 65 76 61 6c 20 22 27 64 69 72 63 6f
0000020 6c 6f 72 73 20 2d 62 20 24 44 49 52 5f 43 4f 4c
0000040 4f 52 53 27 22 0a
0000046
EDIT: printout of whereis dircolors
dircolors: /usr/bin/dircolors /usr/bin/X11/dircolors /usr/share/man/man1/dircolors.1.gz
.bashrc
. Maybe a special character sneaked in here, but what you posted in your question looks right. Please post the output of<~/.bashrc grep dircolors | od -t x1
whereis dircolors
?od
hex output you appear to have regular single quotes (0x27 ='
) instead of backticks (0x60 =`
) around the eval argumenteval "`dircolors -b $DIR_COLORS`"