2 .\" manpage for /etc/dir_colors, config file for dircolors(1)
3 .\" extracted from color-ls 3.12.0.3 dircolors(1) manpage
5 .\" This file may be copied under the conditions described
6 .\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998
7 .\" that should have been distributed together with this file.
9 .\" Modified Sat Dec 22 22:25:33 2001 by Martin Schulze <joey@infodrom.org>
11 .TH DIR_COLORS 5 2001-12-26 "GNU" "Linux User Manual"
13 dir_colors \- configuration file for dircolors(1)
17 uses the environment variable
19 to determine the colors in which the filenames are to be displayed.
20 This environment variable is usually set by a command like
23 eval `dircolors some_path/dir_colors`
26 found in a system default shell initialization file, like
32 Usually, the file used here is
34 and can be overridden by a
36 file in one's home directory.
38 This configuration file consists of several statements, one per line.
39 Anything right of a hash mark (#) is treated as a comment, if the
40 hash mark is at the beginning of a line or is preceded by at least one
42 Blank lines are ignored.
46 section of the file consists of any statement before the first
49 Any statement in the global section of the file is
50 considered valid for all terminal types.
51 Following the global section
54 sections, preceded by one or more
56 statements which specify the terminal types (as given by the
58 environment variable) the following declarations apply to.
59 It is always possible to override a global declaration by a subsequent
60 terminal-specific one.
62 The following statements are recognized; case is insignificant:
64 .B TERM \fIterminal-type\fR
65 Starts a terminal-specific section and specifies which terminal it
69 statements can be used to create a section which applies for several
72 .B COLOR yes|all|no|none|tty
73 (Slackware only; ignored by GNU
75 Specifies that colorization should always be enabled (\fIyes\fR or
76 \fIall\fR), never enabled (\fIno\fR or \fInone\fR), or enabled only if
77 the output is a terminal (\fItty\fR).
78 The default is \fIno\fR.
81 (Slackware only; ignored by GNU
83 Specifies that eight-bit ISO 8859 characters should be enabled by
85 For compatibility reasons, this can also be specified as 1 for
86 \fIyes\fR or 0 for \fIno\fR.
87 The default is \fIno\fR.
89 .B OPTIONS \fIoptions\fR
90 (Slackware only; ignored by GNU
92 Adds command line options to the default
95 The options can be any valid
97 command line options, and should include the leading minus sign.
100 does not verify the validity of these options.
102 .B NORMAL \fIcolor-sequence\fR
103 Specifies the color used for normal (non-filename) text.
105 .B FILE \fIcolor-sequence\fR
106 Specifies the color used for a regular file.
108 .B DIR \fIcolor-sequence\fR
109 Specifies the color used for directories.
111 .B LINK \fIcolor-sequence\fR
112 Specifies the color used for a symbolic link.
114 .B ORPHAN \fIcolor-sequence\fR
115 Specifies the color used for an orphaned symbolic link (one which
116 points to a nonexistent file).
117 If this is unspecified,
123 .B MISSING \fIcolor-sequence\fR
124 Specifies the color used for a missing file (a nonexistent file which
125 nevertheless has a symbolic link pointing to it).
126 If this is unspecified,
132 .B FIFO \fIcolor-sequence\fR
133 Specifies the color used for a FIFO (named pipe).
135 .B SOCK \fIcolor-sequence\fR
136 Specifies the color used for a socket.
138 .B DOOR \fIcolor-sequence\fR
139 (Supported since fileutils 4.1)
140 Specifies the color used for a door (Solaris 2.5 and later).
142 .B BLK \fIcolor-sequence\fR
143 Specifies the color used for a block device special file.
145 .B CHR \fIcolor-sequence\fR
146 Specifies the color used for a character device special file.
148 .B EXEC \fIcolor-sequence\fR
149 Specifies the color used for a file with the executable attribute set.
151 .B LEFTCODE \fIcolor-sequence\fR
154 for non-ISO\ 6429 terminals (see below).
156 .B RIGHTCODE \fIcolor-sequence\fR
159 for non-ISO\ 6429 terminals (see below).
161 .B ENDCODE \fIcolor-sequence\fR
164 for non-ISO\ 6429 terminals (see below).
166 \fB*\fIextension\fR \fIcolor-sequence\fR
167 Specifies the color used for any file that ends in \fIextension\fR.
169 \fB .\fIextension\fR \fIcolor-sequence\fR
170 Same as \fB*\fR.\fIextension\fR.
171 Specifies the color used for any file that
172 ends in .\fIextension\fR.
173 Note that the period is included in the
174 extension, which makes it impossible to specify an extension not
175 starting with a period, such as
180 This form should be considered obsolete.
181 .SS "ISO 6429 (ANSI) Color Sequences"
182 Most color-capable ASCII terminals today use ISO 6429 (ANSI) color sequences,
183 and many common terminals without color capability, including
185 and the widely used and cloned DEC VT100, will recognize ISO 6429 color
186 codes and harmlessly eliminate them from the output or emulate them.
188 uses ISO 6429 codes by default, assuming colorization is enabled.
190 ISO 6429 color sequences are composed of sequences of numbers
191 separated by semicolons.
192 The most common codes are:
197 0 to restore default color
198 1 for brighter colors
199 4 for underlined text
201 30 for black foreground
202 31 for red foreground
203 32 for green foreground
204 33 for yellow (or brown) foreground
205 34 for blue foreground
206 35 for purple foreground
207 36 for cyan foreground
208 37 for white (or gray) foreground
209 40 for black background
210 41 for red background
211 42 for green background
212 43 for yellow (or brown) background
213 44 for blue background
214 45 for purple background
215 46 for cyan background
216 47 for white (or gray) background
220 Not all commands will work on all systems or display devices.
223 uses the following defaults:
228 \fBNORMAL\fR 0 Normal (non-filename) text
229 \fBFILE\fR 0 Regular file
230 \fBDIR\fR 32 Directory
231 \fBLINK\fR 36 Symbolic link
232 \fBORPHAN\fR undefined Orphaned symbolic link
233 \fBMISSING\fR undefined Missing file
234 \fBFIFO\fR 31 Named pipe (FIFO)
236 \fBBLK\fR 44;37 Block device
237 \fBCHR\fR 44;37 Character device
238 \fBEXEC\fR 35 Executable file
242 A few terminal programs do not recognize the default
244 If all text gets colorized after you do a directory
249 codes to the numerical codes for your normal foreground and background
251 .SS "Other Terminal Types (Advanced Configuration)"
252 If you have a color-capable (or otherwise highlighting) terminal (or
253 printer!) which uses a different set of codes, you can still generate
255 To do so, you will have to use the
262 When writing out a filename,
264 generates the following output sequence:
272 is the color sequence that depends on the type or name of file.
275 is undefined, the sequence
276 .B "LEFTCODE NORMAL RIGHTCODE"
277 will be used instead.
278 The purpose of the left- and rightcodes is
279 merely to reduce the amount of typing necessary (and to hide ugly
280 escape codes away from the user).
281 If they are not appropriate for
282 your terminal, you can eliminate them by specifying the respective
283 keyword on a line by itself.
288 is defined in the global section of the setup file, it
290 be undefined in a terminal-specific section of the file.
293 definition will have no effect.
296 can, however, be specified, which would have the same effect.
297 .SS "Escape Sequences"
298 To specify control- or blank characters in the color sequences or
299 filename extensions, either C-style \e-escaped notation or
301 ^-notation can be used.
303 includes the following characters:
308 \fB\ea\fR Bell (ASCII 7)
309 \fB\eb\fR Backspace (ASCII 8)
310 \fB\ee\fR Escape (ASCII 27)
311 \fB\ef\fR Form feed (ASCII 12)
312 \fB\en\fR Newline (ASCII 10)
313 \fB\er\fR Carriage Return (ASCII 13)
314 \fB\et\fR Tab (ASCII 9)
315 \fB\ev\fR Vertical Tab (ASCII 11)
316 \fB\e?\fR Delete (ASCII 127)
317 \fB\e\fInnn\fR Any character (octal notation)
318 \fB\ex\fInnn\fR Any character (hexadecimal notation)
320 \fB\e\e\fR Backslash (\e)
322 \fB\e#\fR Hash mark (#)
326 Please note that escapes are necessary to enter a space, backslash,
327 caret, or any control character anywhere in the string, as well as a
328 hash mark as the first character.
332 System-wide configuration file.
335 Per-user configuration file.
337 This page describes the
339 file format as used in the fileutils-4.1 package;
340 other versions may differ slightly.
346 definitions, which are used by ISO 6429 terminals are: