dircolors 中文man頁面
NAME[名字]
dircolors - 設置‘ls'顯示結果的顏色
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 從該文件確定那些顏色用于什么文件類型和外延. 否則使用一個預先編譯好的數據庫. 關于這個文件的詳細格式, 運行`dircolors --print-database'.
輸出是一個shell命令去設置 LS_COLORS 環境變量.你能夠指定shell語法來在命令行使用,或者 dircolors 將推測它是來自 SHELL 環境變量的值.
完成這個命令后, `ls --color' (可能已經alias 為 ls) 會以渴望的顏色列表文件.
選項
- -b, --sh, --bourne-shell
- 輸出 Bourne shell 命令.如果設置了 SHELL 環境變量設置了和沒有以 csh 或是 tcsh 結尾,這就是默認值.
- -c, --csh, --c-shell
- 輸出C shell 命令. 如果 SHELL 以 csh 或 tcsh 結尾的時候是默認值.
- -p, --print-database
- 顯示(已編譯)的默認顏色配置數據庫. 這個輸出本身就是有效的配置文件并且相當清楚地描述了可能的情況.
GNU 標準選項
- --help
- 顯示使用信息在標準輸出并退出.
- --version
- 顯示版本信息在標準輸出并退出.
- --
- 結束選項列表.
環境(變量)
變量 SHELL and TERM 通常能從shell命令中正確找到. 變量LANG, LC_ALL, LC_CTYPE 和 LC_MESSAGES 有通常的意義. 變量LS_COLORS 被用于信息到 ls.
遵循
有色彩的 ls(1) 輸出是一項 GNU 擴展. 這個實現和跟著最早的 Slackware Linux 發布的 dircolors/color-ls 包不太兼容. 尤其是沒有提供對 Z shell 和 Korn shell 的支持.使用這些shells 應該使用 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.