Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Child Fund

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 58 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       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  declara­
       tions  apply  to.   It  is  always  possible to override a
       global declaration by a subsequent terminal-specific  one.

       The following statements are recognized; case is insignif­

       TERM terminal-type
              Starts a terminal-specific  section  and  specifies
              which terminal it applies to.  Multiple TERM state­
              ments 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.
              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.

       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

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

       SOCK color-sequence
              Specifies the color used for a socket.

       DOOR color-sequence
              (Supported  since  file-utils  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

       CHR color-sequence
              Specifies  the  color  used  for a character device
              special file.

       EXEC color-sequence
              Specifies the color used for a file with  the  exe­
              cutable attribute set.

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

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

       ENDCODE color-sequence
              Specifies  the  end code for non-ISO 6429 terminals


       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 num­
       bers 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

       ls uses the following defaults:

         NORMAL   0       Normal (non-filename) text
         FILE     0       Regular file
         DIR      32      Directory
         LINK     36      Symbolic link
         ORPHAN   undefined       Orphanned symbolic link
         MISSING  undefined       Missing file
         FIFO     31      Named pipe (FIFO)
         SOCK     33      Socket
         BLK      44;37   Block device
         CHR      44;37   Character device
         EXEC     35      Executable file

       A few terminal programs do not recognize the default prop­
       erly.  If all text gets colorized after you do a directory
       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-spe­
       cific  section of the file.  This means any NORMAL defini­
       tion will have no effect.  A different ENDCODE  can,  how­
       ever, be specified, which would have the same effect.


       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:

         \a      Bell (ASCII 7)
         \b      Backspace (ASCII 8)
         \e      Escape (ASCII 27)
         \f      Form feed (ASCII 12)
         \n      Newline (ASCII 10)
         \r      Carriage Return (ASCII 13)
         \t      Tab (ASCII 9)
         \v      Vertical Tab (ASCII 11)
         \?      Delete (ASCII 127)
         \nnn Any character (octal notation)
         \xnnn        Any 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.


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

         LEFTCODE  \e[
         RIGHTCODE m

       The default ENDCODE is undefined.


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


GNU fileutils 4.1           2001-12-26              DIR_COLORS(5)
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.10 Seconds