dir_colors — configuration file for dircolors(1)
The program ls(1) uses the environment
      variable LS_COLORS to determine
      the colors in which the filenames are to be displayed. This
      environment variable is usually set by a command like
eval `dircolors some_path/dir_colors`
found in a system default shell initialization file, like
      /etc/profile or /etc/csh.cshrc. (See also dircolors(1).) Usually, the
      file used here is /etc/DIR_COLORS and can be overridden by a
      .dir_colors file in
      one's home directory.
This configuration file consists of several statements, one per line. Anything right of a hash mark (#) is treated as a comment, if the hash mark is at the beginning of a line or is preceded by at least one whitespace. Blank lines are ignored.
The global
      section of the file consists of any statement before the
      first TERM statement. Any
      statement in the global section of the file is considered
      valid for all terminal types. Following the global section is
      one or more terminal-specific sections,
      preceded by one or more TERM
      statements which specify the terminal types (as given by the
      TERM environment variable) the
      following declarations apply to. It is always possible to
      override a global declaration by a subsequent
      terminal-specific one.
The following statements are recognized; case is insignificant:
terminal-typeStarts a terminal-specific section and specifies
            which terminal it applies to. Multiple TERM statements can be used to create
            a section which applies for several terminal types.
(Slackware only; ignored by GNU dircolors(1).)
            Specifies that colorization should always be enabled
            (yes or
            all), never
            enabled (no
            or none), or
            enabled only if the output is a terminal (tty). The default is
            no.
(Slackware only; ignored by GNU dircolors(1).)
            Specifies that eight-bit ISO 8859 characters should be
            enabled by default. For compatibility reasons, this can
            also be specified as 1 for yes or 0 for no. The default is
            no.
options(Slackware only; ignored by GNU dircolors(1).) Adds command-line options to the default ls command line. The options can be any valid ls command-line options, and should include the leading minus sign. Note that dircolors does not verify the validity of these options.
color-sequenceSpecifies the color used for normal (nonfilename) text.
color-sequenceSpecifies the color used for a regular file.
color-sequenceSpecifies the color used for directories.
color-sequenceSpecifies the color used for a symbolic link.
color-sequenceSpecifies the color used for an orphaned symbolic
            link (one which points to a nonexistent file). If this
            is unspecified, ls will use the
            LINK color instead.
color-sequenceSpecifies the color used for a missing file (a
            nonexistent file which nevertheless has a symbolic link
            pointing to it). If this is unspecified, ls will use the
            FILE color instead.
color-sequenceSpecifies the color used for a FIFO (named pipe).
color-sequenceSpecifies the color used for a socket.
color-sequence(Supported since fileutils 4.1) Specifies the color used for a door (Solaris 2.5 and later).
color-sequenceSpecifies the color used for a block device special file.
color-sequenceSpecifies the color used for a character device special file.
color-sequenceSpecifies the color used for a file with the executable attribute set.
color-sequenceSpecifies the left code for non-ISO 6429 terminals (see below).
color-sequenceSpecifies the right code for non-ISO 6429 terminals (see below).
color-sequenceSpecifies the end code for non-ISO 6429 terminals (see below).
extension color-sequenceSpecifies the color used for any file that ends in
            extension.
extension color-sequenceSame as *.extension. Specifies
            the color used for any file that ends in .extension. Note that
            the period is included in the extension, which makes it
            impossible to specify an extension not starting with a
            period, such as ~ for
            emacs backup
            files. This form should be considered obsolete.
Most color-capable ASCII terminals today use ISO 6429
        (ANSI) color sequences, and many common terminals without
        color capability, including xterm and the widely used
        and cloned DEC VT100, will recognize ISO 6429 color codes
        and harmlessly eliminate them from the output or emulate
        them. ls uses
        ISO 6429 codes by default, assuming colorization is
        enabled.
ISO 6429 color sequences are composed of sequences of numbers separated by semicolons. The most common codes are:
0 to restore default color 1 for brighter colors 4 for underlined text 5 for flashing text 30 for black foreground 31 for red foreground 32 for green foreground 33 for yellow (or brown) foreground 34 for blue foreground 35 for purple foreground 36 for cyan foreground 37 for white (or gray) foreground 40 for black background 41 for red background 42 for green background 43 for yellow (or brown) background 44 for blue background 45 for purple background 46 for cyan background 47 for white (or gray) background
Not all commands will work on all systems or display devices.
ls uses the following defaults:
NORMAL0 Normal (nonfilename) textFILE0 Regular fileDIR32 DirectoryLINK36 Symbolic linkORPHANundefined Orphaned symbolic linkMISSINGundefined Missing fileFIFO31 Named pipe (FIFO)SOCK33 SocketBLK44;37 Block deviceCHR44;37 Character deviceEXEC35 Executable file
A few terminal programs do not recognize the default
        properly. If all text gets colorized after you do a
        directory listing, change the NORMAL and FILE codes to the numerical codes for
        your normal foreground and background colors.
If you have a color-capable (or otherwise highlighting)
        terminal (or printer!) which uses a different set of codes,
        you can still generate a suitable setup. To do so, you will
        have to use the LEFTCODE,
        RIGHTCODE, and ENDCODE definitions.
When writing out a filename, ls generates the
        following output sequence: LEFTCODE typecode RIGHTCODE filename ENDCODE, where the typecode is the color
        sequence that depends on the type or name of file. If the
        ENDCODE is undefined, the
        sequence LEFTCODE NORMAL
        RIGHTCODE will be used instead. The purpose of
        the left- and rightcodes is merely to reduce the amount of
        typing necessary (and to hide ugly escape codes away from
        the user). If they are not appropriate for your terminal,
        you can eliminate them by specifying the respective keyword
        on a line by itself.
| ![[Note]](../stylesheet/note.png) | Note | 
|---|---|
| If the  | 
To specify control- or blank characters in the color
        sequences or filename extensions, either C-style \-escaped
        notation or stty−style
        ^-notation can be used. The C-style notation includes the
        following characters:
\aBell (ASCII 7)\bBackspace (ASCII 8)\eEscape (ASCII 27)\fForm feed (ASCII 12)\nNewline (ASCII 10)\rCarriage Return (ASCII 13)\tTab (ASCII 9)\vVertical Tab (ASCII 11)\?Delete (ASCII 127) \nnnAny character (octal notation) \xnnnAny character (hexadecimal notation)\_Space\\Backslash (\)\^Caret (^)\#Hash mark (#)
Please note that escapes are necessary to enter a space, backslash, caret, or any control character anywhere in the string, as well as a hash mark as the first character.
/etc/DIR_COLORSSystem-wide configuration file.
~/.dir_colorsPer-user configuration file.
This page describes the dir_colors file format as
      used in the fileutils-4.1 package; other versions may differ
      slightly.
The default LEFTCODE and
      RIGHTCODE definitions, which
      are used by ISO 6429 terminals are:
LEFTCODE\e[RIGHTCODEm
The default ENDCODE is
      undefined.
This page is part of release 3.33 of the Linux man-pages project. A
      description of the project, and information about reporting
      bugs, can be found at http://man7.org/linux/man-pages/.
| manpage for /etc/dir_colors, config file for dircolors(1) extracted from color-ls 3.12.0.3 dircolors(1) manpage 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 Sat Dec 22 22:25:33 2001 by Martin Schulze <joeyinfodrom.org> |