1 .\" manpage for /etc/dir_colors, config file for dircolors(1)
2 .\" extracted from color-ls 3.12.0.3 dircolors(1) manpage
4 .\" %%%LICENSE_START(LDPv1)
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.
10 .\" Modified Sat Dec 22 22:25:33 2001 by Martin Schulze <joey@infodrom.org>
12 .TH DIR_COLORS 5 2001-12-26 "GNU" "Linux User Manual"
14 dir_colors \- configuration file for dircolors(1)
18 uses the environment variable
20 to determine the colors in which the filenames are to be displayed.
21 This environment variable is usually set by a command like
24 eval \`dircolors some_path/dir_colors\`
27 found in a system default shell initialization file, like
33 Usually, the file used here is
35 and can be overridden by a
37 file in one's home directory.
39 This configuration file consists of several statements, one per line.
40 Anything right of a hash mark (#) is treated as a comment, if the
41 hash mark is at the beginning of a line or is preceded by at least one
43 Blank lines are ignored.
47 section of the file consists of any statement before the first
50 Any statement in the global section of the file is
51 considered valid for all terminal types.
52 Following the global section
55 sections, preceded by one or more
57 statements which specify the terminal types (as given by the
59 environment variable) the following declarations apply to.
60 It is always possible to override a global declaration by a subsequent
61 terminal-specific one.
63 The following statements are recognized; case is insignificant:
65 .B TERM \fIterminal-type\fR
66 Starts a terminal-specific section and specifies which terminal it
70 statements can be used to create a section which applies for several
73 .B COLOR yes|all|no|none|tty
74 (Slackware only; ignored by GNU
76 Specifies that colorization should always be enabled (\fIyes\fR or
77 \fIall\fR), never enabled (\fIno\fR or \fInone\fR), or enabled only if
78 the output is a terminal (\fItty\fR).
79 The default is \fIno\fR.
82 (Slackware only; ignored by GNU
84 Specifies that eight-bit ISO 8859 characters should be enabled by
86 For compatibility reasons, this can also be specified as 1 for
87 \fIyes\fR or 0 for \fIno\fR.
88 The default is \fIno\fR.
90 .B OPTIONS \fIoptions\fR
91 (Slackware only; ignored by GNU
93 Adds command-line options to the default
96 The options can be any valid
98 command-line options, and should include the leading minus sign.
101 does not verify the validity of these options.
103 .B NORMAL \fIcolor-sequence\fR
104 Specifies the color used for normal (nonfilename) text.
106 .B FILE \fIcolor-sequence\fR
107 Specifies the color used for a regular file.
109 .B DIR \fIcolor-sequence\fR
110 Specifies the color used for directories.
112 .B LINK \fIcolor-sequence\fR
113 Specifies the color used for a symbolic link.
115 .B ORPHAN \fIcolor-sequence\fR
116 Specifies the color used for an orphaned symbolic link (one which
117 points to a nonexistent file).
118 If this is unspecified,
124 .B MISSING \fIcolor-sequence\fR
125 Specifies the color used for a missing file (a nonexistent file which
126 nevertheless has a symbolic link pointing to it).
127 If this is unspecified,
133 .B FIFO \fIcolor-sequence\fR
134 Specifies the color used for a FIFO (named pipe).
136 .B SOCK \fIcolor-sequence\fR
137 Specifies the color used for a socket.
139 .B DOOR \fIcolor-sequence\fR
140 (Supported since fileutils 4.1)
141 Specifies the color used for a door (Solaris 2.5 and later).
143 .B BLK \fIcolor-sequence\fR
144 Specifies the color used for a block device special file.
146 .B CHR \fIcolor-sequence\fR
147 Specifies the color used for a character device special file.
149 .B EXEC \fIcolor-sequence\fR
150 Specifies the color used for a file with the executable attribute set.
152 .B LEFTCODE \fIcolor-sequence\fR
155 for non-ISO\ 6429 terminals (see below).
157 .B RIGHTCODE \fIcolor-sequence\fR
160 for non-ISO\ 6429 terminals (see below).
162 .B ENDCODE \fIcolor-sequence\fR
165 for non-ISO\ 6429 terminals (see below).
167 \fB*\fIextension\fR \fIcolor-sequence\fR
168 Specifies the color used for any file that ends in \fIextension\fR.
170 \fB .\fIextension\fR \fIcolor-sequence\fR
171 Same as \fB*\fR.\fIextension\fR.
172 Specifies the color used for any file that
173 ends in .\fIextension\fR.
174 Note that the period is included in the
175 extension, which makes it impossible to specify an extension not
176 starting with a period, such as
181 This form should be considered obsolete.
182 .SS ISO 6429 (ANSI) color sequences
183 Most color-capable ASCII terminals today use ISO 6429 (ANSI) color sequences,
184 and many common terminals without color capability, including
186 and the widely used and cloned DEC VT100, will recognize ISO 6429 color
187 codes and harmlessly eliminate them from the output or emulate them.
189 uses ISO 6429 codes by default, assuming colorization is enabled.
191 ISO 6429 color sequences are composed of sequences of numbers
192 separated by semicolons.
193 The most common codes are:
198 0 to restore default color
199 1 for brighter colors
200 4 for underlined text
202 30 for black foreground
203 31 for red foreground
204 32 for green foreground
205 33 for yellow (or brown) foreground
206 34 for blue foreground
207 35 for purple foreground
208 36 for cyan foreground
209 37 for white (or gray) foreground
210 40 for black background
211 41 for red background
212 42 for green background
213 43 for yellow (or brown) background
214 44 for blue background
215 45 for purple background
216 46 for cyan background
217 47 for white (or gray) background
221 Not all commands will work on all systems or display devices.
224 uses the following defaults:
228 NORMAL 0 Normal (nonfilename) text
231 LINK 36 Symbolic link
232 ORPHAN undefined Orphaned symbolic link
233 MISSING undefined Missing file
234 FIFO 31 Named pipe (FIFO)
236 BLK 44;37 Block device
237 CHR 44;37 Character device
238 EXEC 35 Executable file
241 A few terminal programs do not recognize the default
243 If all text gets colorized after you do a directory
248 codes to the numerical codes for your normal foreground and background
250 .SS Other terminal types (advanced configuration)
251 If you have a color-capable (or otherwise highlighting) terminal (or
252 printer!) which uses a different set of codes, you can still generate
254 To do so, you will have to use the
261 When writing out a filename,
263 generates the following output sequence:
271 is the color sequence that depends on the type or name of file.
274 is undefined, the sequence
275 .B "LEFTCODE NORMAL RIGHTCODE"
276 will be used instead.
277 The purpose of the left- and rightcodes is
278 merely to reduce the amount of typing necessary (and to hide ugly
279 escape codes away from the user).
280 If they are not appropriate for
281 your terminal, you can eliminate them by specifying the respective
282 keyword on a line by itself.
287 is defined in the global section of the setup file, it
289 be undefined in a terminal-specific section of the file.
292 definition will have no effect.
295 can, however, be specified, which would have the same effect.
297 To specify control- or blank characters in the color sequences or
298 filename extensions, either C-style \e-escaped notation or
300 ^-notation can be used.
302 includes the following characters:
308 \eb Backspace (ASCII 8)
309 \ee Escape (ASCII 27)
310 \ef Form feed (ASCII 12)
311 \en Newline (ASCII 10)
312 \er Carriage Return (ASCII 13)
314 \ev Vertical Tab (ASCII 11)
315 \e? Delete (ASCII 127)
316 \e\fInnn Any character (octal notation)
317 \ex\fInnn Any character (hexadecimal notation)
325 Please note that escapes are necessary to enter a space, backslash,
326 caret, or any control character anywhere in the string, as well as a
327 hash mark as the first character.
331 System-wide configuration file.
334 Per-user configuration file.
336 This page describes the
338 file format as used in the fileutils-4.1 package;
339 other versions may differ slightly.
345 definitions, which are used by ISO 6429 terminals are: