.\" Copyright Andries Brouwer, Ragnar Hojland Espinosa and A. Wik, 1998. .\" Chinese Version Copyright Scorpio, BitBIRD, www.linuxforum.net, 2000 .\" This file may be copied under the conditions described .\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998 .\" that should have been distributed together with this file. .\" .\" Modified, James Sneeringer , Wed Sep 22 23:21:19 1999 .\" .TH DIRCOLORS 1 "November 1998" "GNU fileutils 4.0" .SH NAME[名字] dircolors \- 設置`ls'顯示結果的顏色 .SH SYNOPSIS[總覽] .B dircolors .B [\-b] [\-\-sh] [\-\-bourne\-shell] .B [\-c] [\-\-csh] [\-\-c\-shell] .B [\-p] [\-\-print\-database] .B [\-\-help] [\-\-version] .BI [ FILE ] .SH 描述 .B dircolors 輸出希望得到的輸出顏色,是由 .B ls (和 .BR dir , 等.). 典型的用法: .br .RS eval `dircolors [OPTION]... [FILE]` .RE .PP 如果指定了 .I FILE , .B dircolors 從該文件確定那些顏色用於什麼文件類型和外延. 否則使用一個預先編譯好的數據庫. 關於這個文件的詳細格式, 運行`dircolors \-\-print\-database'. .PP 輸出是一個shell命令去設置 .B LS_COLORS 環境變量.你能夠指定shell語法來在命令行使用,或者 .B dircolors 將推測它是來自 .B SHELL 環境變量的值. .PP 完成這個命令後, `ls \-\-color' (可能已經alias 爲 ls) 會以渴望的顏色列表文件. .PP .SH 選項 .TP .B "\-b, \-\-sh, \-\-bourne\-shell" 輸出 Bourne shell 命令.如果設置了 .B SHELL 環境變量設置了和沒有以 .I csh 或是 .IR tcsh 結尾,這就是默認值. .TP .B "\-c, \-\-csh, \-\-c\-shell" 輸出C shell 命令. 如果 .B SHELL 以 .I csh 或 .IR tcsh 結尾的時候是默認值. .TP .B "\-p, \-\-print\-database" 顯示(已編譯)的默認顏色配置數據庫. 這個輸出本身就是有效的配置文件 並且相當清楚地描述了可能的情況. .SH "GNU 標準選項" .TP .B "\-\-help" 顯示使用信息在標準輸出並退出. .TP .B "\-\-version" 顯示版本信息在標準輸出並退出. .TP .B "\-\-" 結束選項列表. .SH 環境(變量) 變量 SHELL and TERM 通常能從shell命令中正確找到. 變量LANG, LC_ALL, LC_CTYPE 和 LC_MESSAGES 有通常的意義. 變量LS_COLORS 被用於信息到 .BR ls . .SH "遵循" 有色彩的 .BR ls (1) 輸出是一項 GNU 擴展. 這個實現和跟着最早的 Slackware Linux 發佈的 .BR dircolors / color\-ls 包不太兼容. 尤其是沒有提供對 Z shell 和 Korn shell 的支持. 使用這些shells 應該使用 Bourne shell (\-b) 模式. .SH "參考" .BR dir_colors (5), .BR ls (1) .SH 相關文件 .TP .I /etc/dir_colors System\-wide configuration file for 爲 .BR dircolors. 提供的系統普用配置文件 .TP .I ~/.dir_colors 每個用戶 .BR dircolors 配置文件. .SH 注意 這份 .B dircolors 的描述能夠在 file\%utils\-4.0 包中找到; 其它的版本也許有些微的不同. 對於修改和新增的請郵到 aeb@cwi.nl. 漏洞報告郵到 fileutils\-bugs@gnu.ai.mit.edu. .br .SH "[中文版維護人]" .B Scorpio .SH "[中文版最新更新]" .BR 2000/10/9 .SH "《中國Linux論壇man手冊頁翻譯計劃》" .BI http://cmpp.linuxforum.net .SH "跋" .br 本頁面中文版由中文 man 手冊頁計劃提供。 .br 中文 man 手冊頁計劃:\fBhttps://github.com/man-pages-zh/manpages-zh\fR