ls 查看之所以能出现颜色,主要是因为 /etc/DIRCOLORS
文件设置的关系
关于从别的系统拷贝的文件或者挂载u盘时候,ls出现块状的颜色
一般是因为目录权限设置为777
# 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
DIR 01;34 # directory
STICKY_OTHER_WRITABLE 00;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
OTHER_WRITABLE 00;34 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
修改 OTHER_WRITEABLE 为00;34; 取消前景色
这样就去掉了目录的颜色块