0
我尝试通过编辑.dircolors文件更改ls命令的目录列表的颜色/属性,但它不起作用。更改我的目录中列出的目录的颜色
在此之前,值得一提的是,我在bash.bashrc文件中添加了以下更改。
# 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
另外,在bashrc中添加了下面的代码来指定dircolors文件路径。
d=.dircolors
test -r $d && eval "$(dircolors $d)"
刚刚开始使用ubuntu的时候,我对这些东西有了一个模糊的想法。 那么有人可以帮我找出为什么我无法改变LS命令的颜色的原因吗?