change dir color in terminal

ganiks@ubuntu ➜  ~  dircolors --help
用法:dircolors [选项]... [文件]
输出用来设置 LS_COLORS 环境变量的命令。

指定输出的规格:
  -b, --sh, --bourne-shell  输出设置LS_COLORS 的Bourne shell 命令
  -c, --csh, --c-shell      输出设置LS_COLORS 的C shell 命令
  -p, --print-database      输出默认的色彩设置
      --help        显示此帮助信息并退出
      --version     显示版本信息并退出

#拷贝系统当前的dircolors一份到当前目录,再进行自定义
ganiks@ubuntu ➜  ~  dircolors -p > ~/.dir_colours
# Below are the color init strings for the basic file types. A color init¬
# string consists of one or more of the following numeric codes:¬
# Attribute codes:¬
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed¬
# Text color codes:¬
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white¬
# Background color codes:¬
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white¬
#NORMAL 00 # no color code at all¬
#FILE 00 # regular file: use no color at all¬
RESET 0 # reset to "normal" color¬
# DIR 01;34 # directory¬
DIR 34;37 # directory¬
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a¬
 # numerical value, the color is as for the file pointed to.)¬
MULTIHARDLINK 00 # regular file with more than one link¬
FIFO 40;33 # pipe¬
SOCK 01;35 # socket¬
DOOR 01;35 # door¬
BLK 40;33;01 # block device driver¬
CHR 40;33;01 # character device driver¬
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file¬
SETUID 37;41 # file that is setuid (u+s)¬
SETGID 30;43 # file that is setgid (g+s)¬
CAPABILITY 30;41 # file with capability¬
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)¬
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky¬
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable¬
# This is for files with execute permission:¬
EXEC 01;32¬
ganiks@ubuntu ➜  ~  ls
examples.desktop  tmp             workspace-learn  模板  文档  桌面
Software          workspace       workspace-test   视频  下载
Tencent Files     workspace-fork  公共的           图片  音乐
#载入新的 .dir_colors
ganiks@ubuntu ➜  ~  eval $(dircolors -b .dir_colors)
ganiks@ubuntu ➜  ~  ls
examples.desktop  tmp             workspace-learn  模板  文档  桌面
Software          workspace       workspace-test   视频  下载
Tencent Files     workspace-fork  公共的           图片  音乐
ganiks@ubuntu ➜  ~  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值