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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-14-2010, 11:57 AM
|
#1
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Rep:
|
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?
|
|
|
01-14-2010, 12:13 PM
|
#2
|
Member
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Rep:
|
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.
|
|
|
01-14-2010, 12:14 PM
|
#3
|
Member
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342
Rep:
|
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.
|
|
|
01-14-2010, 12:14 PM
|
#4
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
ok, thanks. Looks like some of my directories are blue, some are blue text but highlighted green for some reason.
|
|
|
01-14-2010, 12:17 PM
|
#5
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Quote:
Originally Posted by irmin
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;36 i=40;33:so=00;35:bd=40;33;01:cd=40;33;01 r=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:
|
|
|
01-14-2010, 12:45 PM
|
#6
|
Member
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342
Rep:
|
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.
|
01-14-2010, 01:00 PM
|
#7
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
Cool, thanks for all the info, i'll check it out!
|
|
|
01-14-2010, 01:03 PM
|
#8
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
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?
|
|
|
01-14-2010, 01:13 PM
|
#9
|
Member
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342
Rep:
|
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.
|
|
|
01-14-2010, 01:49 PM
|
#10
|
Senior Member
Registered: Jun 2009
Posts: 1,795
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 01:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|