2 .\" manpage for /etc/dir_colors, config file for dircolors(1)
3 .\" extracted from color-ls 3.12.0.3 dircolors(1) manpage
5 .\" %%%LICENSE_START(LDPv1)
6 .\" This file may be copied under the conditions described
7 .\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998
8 .\" that should have been distributed together with this file.
11 .\" Modified Sat Dec 22 22:25:33 2001 by Martin Schulze <joey@infodrom.org>
13 .TH dir_colors 5 (date) "Linux man-pages (unreleased)"
15 dir_colors \- configuration file for dircolors(1)
19 uses the environment variable
21 to determine the colors in which the filenames are to be displayed.
22 This environment variable is usually set by a command like
25 eval \`dircolors some_path/dir_colors\`
28 found in a system default shell initialization file, like
34 Usually, the file used here is
36 and can be overridden by a
38 file in one's home directory.
40 This configuration file consists of several statements, one per line.
41 Anything right of a hash mark (#) is treated as a comment, if the
42 hash mark is at the beginning of a line or is preceded by at least one
44 Blank lines are ignored.
48 section of the file consists of any statement before the first
51 Any statement in the global section of the file is
52 considered valid for all terminal types.
53 Following the global section
56 sections, preceded by one or more
58 statements which specify the terminal types (as given by the
60 environment variable) the following declarations apply to.
61 It is always possible to override a global declaration by a subsequent
62 terminal-specific one.
64 The following statements are recognized; case is insignificant:
66 .B TERM \fIterminal-type\fR
67 Starts a terminal-specific section and specifies which terminal it
71 statements can be used to create a section which applies for several
74 .B COLOR yes|all|no|none|tty
75 (Slackware only; ignored by GNU
77 Specifies that colorization should always be enabled (\fIyes\fR or
78 \fIall\fR), never enabled (\fIno\fR or \fInone\fR), or enabled only if
79 the output is a terminal (\fItty\fR).
80 The default is \fIno\fR.
83 (Slackware only; ignored by GNU
85 Specifies that eight-bit ISO 8859 characters should be enabled by
87 For compatibility reasons, this can also be specified as 1 for
88 \fIyes\fR or 0 for \fIno\fR.
89 The default is \fIno\fR.
91 .B OPTIONS \fIoptions\fR
92 (Slackware only; ignored by GNU
94 Adds command-line options to the default
97 The options can be any valid
99 command-line options, and should include the leading minus sign.
102 does not verify the validity of these options.
104 .B NORMAL \fIcolor-sequence\fR
105 Specifies the color used for normal (nonfilename) text.
110 .B FILE \fIcolor-sequence\fR
111 Specifies the color used for a regular file.
113 .B DIR \fIcolor-sequence\fR
114 Specifies the color used for directories.
116 .B LINK \fIcolor-sequence\fR
117 Specifies the color used for a symbolic link.
123 .B ORPHAN \fIcolor-sequence\fR
124 Specifies the color used for an orphaned symbolic link (one which
125 points to a nonexistent file).
126 If this is unspecified,
132 .B MISSING \fIcolor-sequence\fR
133 Specifies the color used for a missing file (a nonexistent file which
134 nevertheless has a symbolic link pointing to it).
135 If this is unspecified,
141 .B FIFO \fIcolor-sequence\fR
142 Specifies the color used for a FIFO (named pipe).
147 .B SOCK \fIcolor-sequence\fR
148 Specifies the color used for a socket.
150 .B DOOR \fIcolor-sequence\fR
151 (Supported since fileutils 4.1)
152 Specifies the color used for a door (Solaris 2.5 and later).
154 .B BLK \fIcolor-sequence\fR
155 Specifies the color used for a block device special file.
160 .B CHR \fIcolor-sequence\fR
161 Specifies the color used for a character device special file.
166 .B EXEC \fIcolor-sequence\fR
167 Specifies the color used for a file with the executable attribute set.
169 .B SUID \fIcolor-sequence\fR
170 Specifies the color used for a file with the set-user-ID attribute set.
175 .B SGID \fIcolor-sequence\fR
176 Specifies the color used for a file with the set-group-ID attribute set.
181 .B STICKY \fIcolor-sequence\fR
182 Specifies the color used for a directory with the sticky attribute set.
184 .B STICKY_OTHER_WRITABLE \fIcolor-sequence\fR
185 Specifies the color used for
186 an other-writable directory with the executable attribute set.
191 .B OTHER_WRITABLE \fIcolor-sequence\fR
192 Specifies the color used for
193 an other-writable directory without the executable attribute set.
198 .B LEFTCODE \fIcolor-sequence\fR
201 for non-ISO\ 6429 terminals (see below).
206 .B RIGHTCODE \fIcolor-sequence\fR
209 for non-ISO\ 6429 terminals (see below).
214 .B ENDCODE \fIcolor-sequence\fR
217 for non-ISO\ 6429 terminals (see below).
222 .BI * "extension color-sequence"
223 Specifies the color used for any file that ends in \fIextension\fR.
225 .BI . "extension color-sequence"
226 Same as \fB*\fR.\fIextension\fR.
227 Specifies the color used for any file that
228 ends in .\fIextension\fR.
229 Note that the period is included in the
230 extension, which makes it impossible to specify an extension not
231 starting with a period, such as
236 This form should be considered obsolete.
237 .SS ISO 6429 (ANSI) color sequences
238 Most color-capable ASCII terminals today use ISO 6429 (ANSI) color sequences,
239 and many common terminals without color capability, including
241 and the widely used and cloned DEC VT100, will recognize ISO 6429 color
242 codes and harmlessly eliminate them from the output or emulate them.
244 uses ISO 6429 codes by default, assuming colorization is enabled.
246 ISO 6429 color sequences are composed of sequences of numbers
247 separated by semicolons.
248 The most common codes are:
252 0 to restore default color
253 1 for brighter colors
254 4 for underlined text
256 30 for black foreground
257 31 for red foreground
258 32 for green foreground
259 33 for yellow (or brown) foreground
260 34 for blue foreground
261 35 for purple foreground
262 36 for cyan foreground
263 37 for white (or gray) foreground
264 40 for black background
265 41 for red background
266 42 for green background
267 43 for yellow (or brown) background
268 44 for blue background
269 45 for purple background
270 46 for cyan background
271 47 for white (or gray) background
275 Not all commands will work on all systems or display devices.
278 uses the following defaults:
281 NORMAL 0 Normal (nonfilename) text
284 LINK 36 Symbolic link
285 ORPHAN undefined Orphaned symbolic link
286 MISSING undefined Missing file
287 FIFO 31 Named pipe (FIFO)
289 BLK 44;37 Block device
290 CHR 44;37 Character device
291 EXEC 35 Executable file
294 A few terminal programs do not recognize the default
296 If all text gets colorized after you do a directory
301 codes to the numerical codes for your normal foreground and background
303 .SS Other terminal types (advanced configuration)
304 If you have a color-capable (or otherwise highlighting) terminal (or
305 printer!) which uses a different set of codes, you can still generate
307 To do so, you will have to use the
314 When writing out a filename,
316 generates the following output sequence:
324 is the color sequence that depends on the type or name of file.
327 is undefined, the sequence
328 .B "LEFTCODE NORMAL RIGHTCODE"
329 will be used instead.
330 The purpose of the left- and rightcodes is
331 merely to reduce the amount of typing necessary (and to hide ugly
332 escape codes away from the user).
333 If they are not appropriate for
334 your terminal, you can eliminate them by specifying the respective
335 keyword on a line by itself.
340 is defined in the global section of the setup file, it
342 be undefined in a terminal-specific section of the file.
345 definition will have no effect.
348 can, however, be specified, which would have the same effect.
350 To specify control- or blank characters in the color sequences or
351 filename extensions, either C-style \e-escaped notation or
353 \(ha-notation can be used.
355 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: