LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2010, 11:57 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
Linux CLI through Putty, do colors signify anything?


When I connect to a RHEL CLI via Putty, some folders are blue, some are highlighted green, etc etc.

Does all that signify something? Is there a link to a site that tells me what it all means?
 
Old 01-14-2010, 12:13 PM   #2
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
usually, blue are dirs, green are executables, red are archives, ltblue are symlinks, yellow are devices, etc, etc. basically it depends on color setup on linux box.

Last edited by Web31337; 01-14-2010 at 12:14 PM.
 
Old 01-14-2010, 12:14 PM   #3
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
You mean that you login via Putty and enter e.g. ls to view the contents of the current directory?
ls can view different file types with different colors. (look at the LS_COLORS environment variable to get the meaning of them, since you can configure them as you want).

Enter "echo $LS_COLORS" and entries like "*.gz=0;31" tell you that file names ending with .gz should be viewed green with black background.
 
Old 01-14-2010, 12:14 PM   #4
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
ok, thanks. Looks like some of my directories are blue, some are blue text but highlighted green for some reason.
 
Old 01-14-2010, 12:17 PM   #5
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by irmin View Post
You mean that you login via Putty and enter e.g. ls to view the contents of the current directory?
ls can view different file types with different colors. (look at the LS_COLORS environment variable to get the meaning of them, since you can configure them as you want).

Enter "echo $LS_COLORS" and entries like "*.gz=0;31" tell you that file names ending with .gz should be viewed green with black background.
yes, when I do a ls -l that's where I'm seeing the different coloring styles.

here's what my echo shows me, but how do I know what the numbers signify? like what color is what number, and is the first number background and the second text color?

no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi=01;05;37;4 1:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar= 00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.b z2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00 ;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
 
Old 01-14-2010, 12:45 PM   #6
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
The values are "Select Graphics Rendition" numbers. You can find their meaning at
http://en.wikipedia.org/wiki/ANSI_escape_code
search for SGR.

Example:
*.sh=00;32 means files matching *.sh will select the following attributes: reset all then select green as the foreground color

e.g.: view png-files as yellow on blue background underlined: *.png=00;04;44;33
special names:
no - nothing
fi - file
di - directory
ln - symbolic link
pi - pipe
so - socket
do - ?
bd - block device
cd - character device
or - invalid file
su - setuid file
sg - setgid file
tw - sticky (writable)
ow - writeable by others (directory)
st - sticky (not writable)
ex - executable
 
1 members found this post helpful.
Old 01-14-2010, 01:00 PM   #7
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Cool, thanks for all the info, i'll check it out!
 
Old 01-14-2010, 01:03 PM   #8
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
I looked, but I still dont understand why some of my directories are just blue text, but some are blue text and highlighted green. does it have something to do with the permissions on the folder? like if its 770 its just blue text, if 777 blue text with green highlight?
 
Old 01-14-2010, 01:13 PM   #9
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Indeed the color has something to do with the permissions. If a directory has permission 777 it is writable by everybody. Thus it falls into category ow. Thus the rules
ow and di are applied.
 
Old 01-14-2010, 01:49 PM   #10
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Oh ok. I didn't see an ow in my echo output, so that must just be a default thing. I think I get it now!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Putty logs me out / Putty throws me out after I log in ytd Linux - General 15 08-09-2009 04:03 AM
Anything better than Putty for CLI anon091 Linux - Newbie 3 07-17-2009 12:26 PM
What does failure to load symbols signify? Millenniumman Programming 2 06-11-2007 07:25 PM
Strange Colors in CLI? carlosinfl Linux - General 2 03-22-2007 10:53 AM
Does this message signify a problem? and should I fix it? M$ISBS Slackware 6 12-28-2006 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration