DIR_COLORS



DIR_COLORS

NAME
DESCRIPTION
FILES
NOTES
SEE ALSO
COLOPHON

NAME

dir_colors − configuration file for dircolors(1)

DESCRIPTION

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:
TERM
terminal-type

Starts 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.

COLOR yes|all|no|none|tty

(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.

EIGHTBIT yes|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 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.

NORMAL color-sequence

Specifies the color used for normal (nonfilename) text.

Synonym: NORM.

FILE color-sequence

Specifies the color used for a regular file.

DIR color-sequence

Specifies the color used for directories.

LINK color-sequence

Specifies the color used for a symbolic link.

Synonyms: LNK, SYMLINK.

ORPHAN color-sequence

Specifies 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.

MISSING color-sequence

Specifies 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.

FIFO color-sequence

Specifies the color used for a FIFO (named pipe).

Synonym: PIPE.

SOCK color-sequence

Specifies the color used for a socket.

DOOR color-sequence

(Supported since fileutils 4.1) Specifies the color used for a door (Solaris 2.5 and later).

BLK color-sequence

Specifies the color used for a block device special file.

Synonym: BLOCK.

CHR color-sequence

Specifies the color used for a character device special file.

Synonym: CHAR.

EXEC color-sequence

Specifies the color used for a file with the executable attribute set.

SUID color-sequence

Specifies the color used for a file with the set-user-ID attribute set.

Synonym: SETUID.

SGID color-sequence

Specifies the color used for a file with the set-group-ID attribute set.

Synonym: SETGID.

STICKY color-sequence

Specifies the color used for a directory with the sticky attribute set.

STICKY_OTHER_WRITABLE color-sequence

Specifies the color used for a other-writable directory with the executable attribute set.

Synonym: OWT.

OTHER_WRITABLE color-sequence

Specifies the color used for a other-writable directory without the executable attribute set.

Synonym: OWR.

LEFTCODE color-sequence

Specifies the left code for non-ISO 6429 terminals (see below).

Synonym: LEFT.

RIGHTCODE color-sequence

Specifies the right code for non-ISO 6429 terminals (see below).

Synonym: RIGHT.

ENDCODE color-sequence

Specifies the end code for non-ISO 6429 terminals (see below).

Synonym: END.

*extension color-sequence

Specifies the color used for any file that ends in extension.

.extension color-sequence

Same 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.

ISO 6429 (ANSI) color sequences
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:

Not all commands will work on all systems or display devices.

ls uses the following defaults:

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.

Other terminal types (advanced configuration)
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: If the ENDCODE is defined in the global section of the setup file, it cannot be undefined in a terminal-specific section of the file. This means any NORMAL definition will have no effect. A different ENDCODE can, however, be specified, which would have the same effect.

Escape sequences
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:

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.

FILES

/etc/DIR_COLORS

System-wide configuration file.

~/.dir_colors

Per-user configuration file.

This page describes the dir_colors file format as used in the fileutils-4.1 package; other versions may differ slightly.

NOTES

The default LEFTCODE and RIGHTCODE definitions, which are used by ISO 6429 terminals are:

The default ENDCODE is undefined.

SEE ALSO

dircolors(1), ls(1), stty(1), xterm(1)

COLOPHON

This page is part of release 3.69 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at http://www.kernel.org/doc/man−pages/.







Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.