summaryrefslogtreecommitdiffstats
path: root/man1/dircolors.1
blob: 5670e608cc50626da4052eee51cf979be9bcae69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.\" 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.