LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-18-2010, 12:15 PM   #1
JeffElkins
LQ Newbie
 
Registered: Sep 2007
Posts: 18

Rep: Reputation: 0
Directory highlight off


I'm in a situation where I need some directories chmod 777 -- the problem is that bash reverse-highlights the directory name making it all but unreadable when I do so. I'd like to turn off this "feature" and have these dirs display at the console like a regular dir.

I've tried

Code:
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=01;40;34:ow=01;40;34:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:';
   
export LS_COLORS
messing with LS_COLORS in my .bashrc file, but I've either not hit the correct combination or this ain't the right way to do it.

Help!
 
Old 02-18-2010, 12:22 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
You can do it the way you're doing, but you might find it more useful in the long run to edit the /etc/DIR_COLORS file.

I believe the item you need to change, the way you are doing it, is the "ow" entry (which means "other-writeable"), but the /etc/DIR_COLORS file should have a little bit more explanation about the various two-letter items.

Also, `man dircolors` is handy too.

Sasha
 
Old 02-18-2010, 12:26 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
PS - I should have mentioned:if you want to turn it off entirely, check your /etc/profile file (it may be another file, so cross your fingers) and see if `ls` is aliased to `ls --colors=` or something like this. To disable the colors entirely, either comment that line out, or, at your shell prompt, reset the `ls` alias to nothing.

Sasha
 
Old 02-18-2010, 12:34 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
The directory setting should be this one:

di=01;34

Just change it to di=00 to disable it completely, or one of the other ansi sequences if you want a different color. This page has a chart of the available color sequences (under the "set graphics mode" entry).

http://ascii-table.com/ansi-escape-sequences.php

Use semicolons to combine properties. 01;34 is bold blue, for example.

PS: Check out the man pages for dircolors and dir_colors, assuming you have it installed.

PPS: You should mention what distro you're using when you post (or just add it to your profile) so we can better understand what you have available.

Last edited by David the H.; 02-18-2010 at 12:44 PM.
 
1 members found this post helpful.
Old 02-18-2010, 12:40 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Thanks David -- I thought the "other-writeable" would apply to the directory as well. Thanks for that clarification, and for the link!

Sasha
 
Old 02-18-2010, 01:49 PM   #6
JeffElkins
LQ Newbie
 
Registered: Sep 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks, very helpful, both of you

I've got it sorted out now.
 
  


Reply



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
Bluefish or any other with asp highlight? skuzye Linux - Software 1 10-01-2008 02:04 AM
Emacs Syntax highlight UltraSoul Linux - Software 1 07-11-2005 09:19 AM
Highlight my own posts ernesto_cgf LQ Suggestions & Feedback 3 05-03-2005 03:58 PM
What's on your highlight-paste? Admiral Yoshi General 3 02-26-2004 07:41 PM
how make emacs highlight ? black Linux - Software 2 09-29-2002 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:39 PM.

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