VectorLinux
October 23, 2014, 03:25:05 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: terminal "dir" and "file" colors  (Read 1447 times)
reb
Vectorite
***
Posts: 136


The BOSS


« on: November 24, 2007, 11:05:18 am »

I know that "directories" are blue, and "files" are white, but the rest of the colors are a mystery to me.

can someone tell me the location where I can find a key to the color codes one encounters when using terminal mode.

I'm using VL 5.8 SOHO final ver.

thanks much

reb
Logged

Ye Ole Montana Saddle Tramp
Nothing is right or wrong, good or bad, only thinking makes it so.  Think about it.
Running a Vector Linux VL3300 with 1 SATA 80GB HDD and 1GB DDR 400 ram, DVD+-RW , and VL 5.9 Delux
Freston
Vectorite
***
Posts: 165


« Reply #1 on: November 24, 2007, 03:22:21 pm »

You can find the configuration for this in /etc/DIR_COLORS

Code:
cat /etc/DIR_COLORS | less
There you'll find:
Code:
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white

NORMAL 00        # global default, although everything should be something.
FILE   00        # normal file
DIR    01;34     # directory
LINK   01;36     # symbolic link
FIFO   40;33     # pipe
SOCK   01;35     # socket
BLK    40;33;01  # block device driver
CHR    40;33;01  # character device driver
ORPHAN 40;31;01  # symlink to nonexistent file

# This is for files with execute permission:
EXEC   01;32
And much more... :-D
« Last Edit: November 24, 2007, 03:24:59 pm by Freston » Logged
JohnB316
Administrator
Vectorian
*****
Posts: 1346


Registered Linux User #386728


« Reply #2 on: November 25, 2007, 06:48:02 am »

To add to Freston's reply, the default prompt is set in the /etc/profile.d/vasm.sh script. If you plan on changing those system-wide defaults, you will need to be root to do so.

HTH,
John
Logged

VL 6.0 SOHO latest alpha on one box, VL 5.9 Lite on the other.
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #3 on: November 25, 2007, 09:37:58 am »

I made a cheat sheet that I hope will be useful to you and others.  I took the output of
Quote
dircolors --print-database
And then "translated" the color codes, then attempted to create a visual with the colors.

There are a few things that I couldn't find by listing the database, and I took a stab at the meanings.  If anyone spots and error please let me know I and will ammend it.  Also any additional stuff that I haven't included would be appreciated also.

I originally did everything with html, but we can't use html in our posts.  Also for the visual, I wanted monospace fonts.  So I made images intead.  Also the cheat sheet can be printed out, and still have the background colors included.

Colors are true to the codes.  How each "terminal" application actually shows those colors is another matter.


Not gonna kill the layout of this thread with a over sized image, but here's a over sized image for printing.
http://img119.imageshack.us/img119/7778/dircolorsvn7.png

Hope this has some use to everyone.
Logged
reb
Vectorite
***
Posts: 136


The BOSS


« Reply #4 on: November 26, 2007, 09:24:58 am »

Hey   "People" your response is great.

Actually I feel like a little kid in a candy store.  I don't know where to start  Cheesy

I'll digest this an see what I can do with it.

thanks much to all

reb
Logged

Ye Ole Montana Saddle Tramp
Nothing is right or wrong, good or bad, only thinking makes it so.  Think about it.
Running a Vector Linux VL3300 with 1 SATA 80GB HDD and 1GB DDR 400 ram, DVD+-RW , and VL 5.9 Delux
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!