set ls color on FreeBSD and ubuntu

Set ls color on FreeBSD using tcsh
$ echo "alias ls ls -GF" >> ~/.cshrc
$ echo "setenv LSCOLORS Cxfxcxdxbxegedabagacad" >> ~/.cshrc
$ source ~/.cshrc
ref: about color value, please man ls

Set ls color on ubuntu using bash
$ vi ~/.bashrc
alias ls='ls -F --color=auto'
$ dircolors --print-database >> .dircolors
$ vi .dircolors (change colors you like)
$ source .dircolors
add color support for other file format
ex: export LS_COLORS=$LS_COLORS:"*.wma=01;35":"*.m4a=01;35"


留言

熱門文章