dircolors 中文man頁(yè)面
NAME[名字]
dircolors - 設(shè)置‘ls'顯示結(jié)果的顏色
SYNOPSIS[總覽]
dircolors [-b] [--sh] [--bourne-shell] [-c] [--csh] [--c-shell] [-p] [--print-database] [--help] [--version] [FILE]
描述
dircolors 輸出希望得到的輸出顏色,是由 ls (和 dir, 等.). 典型的用法:
- eval `dircolors [OPTION]... [FILE]`
如果指定了 FILE , dircolors 從該文件確定那些顏色用于什么文件類型和外延. 否則使用一個(gè)預(yù)先編譯好的數(shù)據(jù)庫(kù). 關(guān)于這個(gè)文件的詳細(xì)格式, 運(yùn)行`dircolors --print-database'.
輸出是一個(gè)shell命令去設(shè)置 LS_COLORS 環(huán)境變量.你能夠指定shell語(yǔ)法來(lái)在命令行使用,或者 dircolors 將推測(cè)它是來(lái)自 SHELL 環(huán)境變量的值.
完成這個(gè)命令后, `ls --color' (可能已經(jīng)alias 為 ls) 會(huì)以渴望的顏色列表文件.
選項(xiàng)
- -b, --sh, --bourne-shell
- 輸出 Bourne shell 命令.如果設(shè)置了 SHELL 環(huán)境變量設(shè)置了和沒(méi)有以 csh 或是 tcsh 結(jié)尾,這就是默認(rèn)值.
- -c, --csh, --c-shell
- 輸出C shell 命令. 如果 SHELL 以 csh 或 tcsh 結(jié)尾的時(shí)候是默認(rèn)值.
- -p, --print-database
- 顯示(已編譯)的默認(rèn)顏色配置數(shù)據(jù)庫(kù). 這個(gè)輸出本身就是有效的配置文件并且相當(dāng)清楚地描述了可能的情況.
GNU 標(biāo)準(zhǔn)選項(xiàng)
- --help
- 顯示使用信息在標(biāo)準(zhǔn)輸出并退出.
- --version
- 顯示版本信息在標(biāo)準(zhǔn)輸出并退出.
- --
- 結(jié)束選項(xiàng)列表.
環(huán)境(變量)
變量 SHELL and TERM 通常能從shell命令中正確找到. 變量LANG, LC_ALL, LC_CTYPE 和 LC_MESSAGES 有通常的意義. 變量LS_COLORS 被用于信息到 ls.
遵循
有色彩的 ls(1) 輸出是一項(xiàng) GNU 擴(kuò)展. 這個(gè)實(shí)現(xiàn)和跟著最早的 Slackware Linux 發(fā)布的 dircolors/color-ls 包不太兼容. 尤其是沒(méi)有提供對(duì) Z shell 和 Korn shell 的支持.使用這些shells 應(yīng)該使用 Bourne shell (-b) 模式.
參考
dir_colors(5), ls(1)
#p#
NAME
dircolors - color setup for ls
SYNOPSIS
dircolors [OPTION]... [FILE]
DESCRIPTION
Output commands to set the LS_COLORS environment variable.
Determine format of output:
- -b, --sh, --bourne-shell
- output Bourne shell code to set LS_COLORS
- -c, --csh, --c-shell
- output C shell code to set LS_COLORS
- -p, --print-database
- output defaults
- --help
- display this help and exit
- --version
- output version information and exit
If FILE is specified, read it to determine which colors to use for which file types and extensions. Otherwise, a precompiled database is used. For details on the format of these files, run `dircolors --print-database'.
AUTHOR
Written by H. Peter Anvin.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
The full documentation for dircolors is maintained as a Texinfo manual. If the info and dircolors programs are properly installed at your site, the command
- info coreutils dircolors
should give you access to the complete manual.