Ls
dircolors 數據庫中的名稱如何映射到 LS_COLORS 中的名稱?
從
dircolors -p
,一些類型似乎有名字:#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 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 ... MISSING 00 # ... and the files they point to 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
這些術語如何映射到 中使用的術語
LS_COLORS
?dircolors -p
有OTHER_WRITABLE
,LS_COLORS
好像很喜歡ow
;dircolors -p
hasCHR
,似乎在cd
中LS_COLORS
,依此類推。
man dircolors
在或GNU 文件中沒有解釋。這在其他地方有記錄嗎?$ dircolors --version dircolors (GNU coreutils) 8.25 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by H. Peter Anvin.
使用者應該使用命令
dircolors
來設置LS_COLORS
.dircolors
配置文件中的條目與環境變數的值之間的對應關係LS_COLORS
沒有記錄,不應依賴。