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 2013-08-09 "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.
109 .B FILE \fIcolor-sequence\fR
110 Specifies the color used for a regular file.
112 .B DIR \fIcolor-sequence\fR
113 Specifies the color used for directories.
115 .B LINK \fIcolor-sequence\fR
116 Specifies the color used for a symbolic link.
122 .B ORPHAN \fIcolor-sequence\fR
123 Specifies the color used for an orphaned symbolic link (one which
124 points to a nonexistent file).
125 If this is unspecified,
131 .B MISSING \fIcolor-sequence\fR
132 Specifies the color used for a missing file (a nonexistent file which
133 nevertheless has a symbolic link pointing to it).
134 If this is unspecified,
140 .B FIFO \fIcolor-sequence\fR
141 Specifies the color used for a FIFO (named pipe).
146 .B SOCK \fIcolor-sequence\fR
147 Specifies the color used for a socket.
149 .B DOOR \fIcolor-sequence\fR
150 (Supported since fileutils 4.1)
151 Specifies the color used for a door (Solaris 2.5 and later).
153 .B BLK \fIcolor-sequence\fR
154 Specifies the color used for a block device special file.
159 .B CHR \fIcolor-sequence\fR
160 Specifies the color used for a character device special file.
165 .B EXEC \fIcolor-sequence\fR
166 Specifies the color used for a file with the executable attribute set.
168 .B SUID \fIcolor-sequence\fR
169 Specifies the color used for a file with the set-user-ID attribute set.
174 .B SGID \fIcolor-sequence\fR
175 Specifies the color used for a file with the set-group-ID attribute set.
180 .B STICKY \fIcolor-sequence\fR
181 Specifies the color used for a directory with the sticky attribute set.
183 .B STICKY_OTHER_WRITABLE \fIcolor-sequence\fR
184 Specifies the color used for a other-writable directory with the executable attribute set.
189 .B OTHER_WRITABLE \fIcolor-sequence\fR
190 Specifies the color used for a other-writable directory without the executable attribute set.
195 .B LEFTCODE \fIcolor-sequence\fR
198 for non-ISO\ 6429 terminals (see below).
203 .B RIGHTCODE \fIcolor-sequence\fR
206 for non-ISO\ 6429 terminals (see below).
211 .B ENDCODE \fIcolor-sequence\fR
214 for non-ISO\ 6429 terminals (see below).
219 \fB*\fIextension\fR \fIcolor-sequence\fR
220 Specifies the color used for any file that ends in \fIextension\fR.
222 \fB .\fIextension\fR \fIcolor-sequence\fR
223 Same as \fB*\fR.\fIextension\fR.
224 Specifies the color used for any file that
225 ends in .\fIextension\fR.
226 Note that the period is included in the
227 extension, which makes it impossible to specify an extension not
228 starting with a period, such as
233 This form should be considered obsolete.
234 .SS ISO 6429 (ANSI) color sequences
235 Most color-capable ASCII terminals today use ISO 6429 (ANSI) color sequences,
236 and many common terminals without color capability, including
238 and the widely used and cloned DEC VT100, will recognize ISO 6429 color
239 codes and harmlessly eliminate them from the output or emulate them.
241 uses ISO 6429 codes by default, assuming colorization is enabled.
243 ISO 6429 color sequences are composed of sequences of numbers
244 separated by semicolons.
245 The most common codes are:
250 0 to restore default color
251 1 for brighter colors
252 4 for underlined text
254 30 for black foreground
255 31 for red foreground
256 32 for green foreground
257 33 for yellow (or brown) foreground
258 34 for blue foreground
259 35 for purple foreground
260 36 for cyan foreground
261 37 for white (or gray) foreground
262 40 for black background
263 41 for red background
264 42 for green background
265 43 for yellow (or brown) background
266 44 for blue background
267 45 for purple background
268 46 for cyan background
269 47 for white (or gray) background
273 Not all commands will work on all systems or display devices.
276 uses the following defaults:
280 NORMAL 0 Normal (nonfilename) text
283 LINK 36 Symbolic link
284 ORPHAN undefined Orphaned symbolic link
285 MISSING undefined Missing file
286 FIFO 31 Named pipe (FIFO)
288 BLK 44;37 Block device
289 CHR 44;37 Character device
290 EXEC 35 Executable file
293 A few terminal programs do not recognize the default
295 If all text gets colorized after you do a directory
300 codes to the numerical codes for your normal foreground and background
302 .SS Other terminal types (advanced configuration)
303 If you have a color-capable (or otherwise highlighting) terminal (or
304 printer!) which uses a different set of codes, you can still generate
306 To do so, you will have to use the
313 When writing out a filename,
315 generates the following output sequence:
323 is the color sequence that depends on the type or name of file.
326 is undefined, the sequence
327 .B "LEFTCODE NORMAL RIGHTCODE"
328 will be used instead.
329 The purpose of the left- and rightcodes is
330 merely to reduce the amount of typing necessary (and to hide ugly
331 escape codes away from the user).
332 If they are not appropriate for
333 your terminal, you can eliminate them by specifying the respective
334 keyword on a line by itself.
339 is defined in the global section of the setup file, it
341 be undefined in a terminal-specific section of the file.
344 definition will have no effect.
347 can, however, be specified, which would have the same effect.
349 To specify control- or blank characters in the color sequences or
350 filename extensions, either C-style \e-escaped notation or
352 ^-notation can be used.
354 includes the following characters:
360 \eb Backspace (ASCII 8)
361 \ee Escape (ASCII 27)
362 \ef Form feed (ASCII 12)
363 \en Newline (ASCII 10)
364 \er Carriage Return (ASCII 13)
366 \ev Vertical Tab (ASCII 11)
367 \e? Delete (ASCII 127)
368 \e\fInnn Any character (octal notation)
369 \ex\fInnn Any character (hexadecimal notation)
377 Note that escapes are necessary to enter a space, backslash,
378 caret, or any control character anywhere in the string, as well as a
379 hash mark as the first character.
383 System-wide configuration file.
386 Per-user configuration file.
388 This page describes the
390 file format as used in the fileutils-4.1 package;
391 other versions may differ slightly.
397 definitions, which are used by ISO 6429 terminals are: