mirror of https://github.com/mkerrisk/man-pages
123 lines
3.1 KiB
Groff
123 lines
3.1 KiB
Groff
.\" Copyright Andries Brouwer, Ragnar Hojland Espinosa and A. Wik, 1998.
|
|
.\"
|
|
.\" 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 <jvs@ocslink.com>, Wed Sep 22 23:21:19 1999
|
|
.\"
|
|
.TH DIRCOLORS 1 1998-11 "GNU fileutils 4.0"
|
|
.SH NAME
|
|
dircolors \- color setup for `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 DESCRIPTION
|
|
.B dircolors
|
|
outputs a sequence of shell commands to define the desired
|
|
color output from
|
|
.B ls
|
|
(and
|
|
.BR dir ,
|
|
etc.). Typical usage:
|
|
.br
|
|
.RS
|
|
eval `dircolors [OPTION]... [FILE]`
|
|
.RE
|
|
.PP
|
|
If
|
|
.I FILE
|
|
is specified,
|
|
.B dircolors
|
|
reads it to determine which colors to use for which file types and
|
|
extensions. Otherwise, a compiled-in database is used. For details
|
|
on the format of these files, run `dircolors \-p'.
|
|
.PP
|
|
The output is a shell command to set the
|
|
.B LS_COLORS
|
|
environment variable. You can specify the shell syntax to use on the
|
|
command line, or
|
|
.B dircolors
|
|
will guess it from the value of the
|
|
.B SHELL
|
|
environment variable.
|
|
.PP
|
|
After execution of this command, `ls \-\-color' (which one might alias to ls)
|
|
will list files in the desired colors.
|
|
.PP
|
|
.SH OPTIONS
|
|
.TP
|
|
.B "\-b, \-\-sh, \-\-bourne\-shell"
|
|
Output Bourne shell commands. This is the default if the
|
|
.B SHELL
|
|
environment variable is set and does not end with
|
|
.I csh
|
|
or
|
|
.IR tcsh .
|
|
.TP
|
|
.B "\-c, \-\-csh, \-\-c\-shell"
|
|
Output C shell commands. This is the default if
|
|
.B SHELL
|
|
ends with
|
|
.I csh
|
|
or
|
|
.IR tcsh .
|
|
.TP
|
|
.B "\-p, \-\-print\-database"
|
|
Print the (compiled-in) default color configuration database. This
|
|
output is itself a valid configuration file, and is fairly
|
|
descriptive of the possibilities.
|
|
.SH "GNU STANDARD OPTIONS"
|
|
.TP
|
|
.B "\-\-help"
|
|
Print a usage message on standard output and exit successfully.
|
|
.TP
|
|
.B "\-\-version"
|
|
Print version information on standard output, then exit successfully.
|
|
.TP
|
|
.B "\-\-"
|
|
Terminate option list.
|
|
.SH ENVIRONMENT
|
|
The variables SHELL and TERM are used to find the proper form
|
|
of the shell command.
|
|
The variables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have the
|
|
usual meaning.
|
|
The variable LS_COLORS is used to transfer information to
|
|
.BR ls .
|
|
.SH "CONFORMING TO"
|
|
Coloured output for
|
|
.BR ls (1)
|
|
is a GNU extension.
|
|
This implementation is not entirely compatible with the original
|
|
.BR dircolors / color-ls
|
|
package distributed with Slackware Linux. Notably, specific support
|
|
for the Z shell and Korn shell is not present. Users of these shells
|
|
should use the Bourne shell (\-b) mode.
|
|
.SH "SEE ALSO"
|
|
.BR ls (1),
|
|
.BR dir_colors (5)
|
|
.SH FILES
|
|
The program
|
|
.B dircolors
|
|
itself does not use any configuration files. However,
|
|
customarily the shell initialization scripts invoke
|
|
.B dircolors
|
|
with one of the following.
|
|
.TP
|
|
.I /etc/DIR_COLORS
|
|
System-wide configuration file for
|
|
.BR dircolors .
|
|
.TP
|
|
.I ~/.dir_colors
|
|
Per-user configuration file for
|
|
.BR dircolors .
|
|
.SH NOTES
|
|
This page describes
|
|
.B dircolors
|
|
as found in the file\%utils-4.0 package;
|
|
other versions may differ slightly.
|