Slackware This Forum is for the discussion of Slackware Linux.
|
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-08-2013, 06:26 PM
|
#1
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Rep:
|
ls: some directory names are displayed within a box.
Slackware 14.0
ls 8.19
Some directory names are displayed within a box by ls. Say, if the characters are blue, then the box is green. If black and white (no color option) then black on white. It is not a result of the options field in /etc/fstab, because it does not happen with all dirs. There must be sometthing wrong in LS_OPTIONS. But what?
|
|
|
|
01-08-2013, 06:54 PM
|
#2
|
|
Member
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.0, 13.1, 13.37, 64-14
Posts: 679
Rep: 
|
It sounds like hilighting for 777 permissions.
Could you paste an example of ls -l which is showing like that.
|
|
|
|
01-08-2013, 07:33 PM
|
#3
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
OK. I now see. drwxrwxrwx gets that efect (hightlighting). drwxr-xr-x does not. So the remedy is easy: 'chmod -r g-w *' and 'chmod -r o-w *'. But any way to avoid the highlighting no matter how the permissions are set?
Not so easy. Because chmod I need then to work only on directories.
Last edited by stf92; 01-08-2013 at 07:36 PM.
|
|
|
|
01-08-2013, 07:49 PM
|
#4
|
|
Member
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.0, 13.1, 13.37, 64-14
Posts: 679
Rep: 
|
Quote:
Originally Posted by stf92
OK. I now see. drwxrwxrwx gets that efect (hightlighting). drwxr-xr-x does not. So the remedy is easy: 'chmod -r g-w *' and 'chmod -r o-w *'. But any way to avoid the highlighting no matter how the permissions are set?
|
But why does it need a "remedy"? If those permissions are set that way for a reason the hilighting is only showing you what they are.
[EDIT]
Forgot to add - to disable hilighting completely use --color=never on ls. Probably if you added to your .bashrc
Code:
alias ls='ls --color=never'
[/EDIT]
Last edited by astrogeek; 01-08-2013 at 07:54 PM.
|
|
|
|
01-08-2013, 07:54 PM
|
#5
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
They got that way after copying whole big trees from DVD. Now, it has an adverse effect on my eyes.
|
|
|
|
01-08-2013, 07:56 PM
|
#6
|
|
Member
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.0, 13.1, 13.37, 64-14
Posts: 679
Rep: 
|
Quote:
Originally Posted by stf92
They got that way after copying whole big trees from DVD. Now, it has an adverse effect on my eyes.
|
See updated last post to turn colors off.
|
|
|
|
01-08-2013, 08:33 PM
|
#7
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
If I did post it was because I had some time ago used --color=never, but it resulted in boxes all the same, only that black on white. But I do not remember the exact settings in /etc or ~/. But now the problem is solved thanks to your post, because it somehow works. Furthermore, I changed the variable COLOR in /etc/profile.d/coreutils-dircolors.sh from 'auto' to 'never', so I have identical settings for root and me.
|
|
|
|
01-08-2013, 11:40 PM
|
#8
|
|
Member
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.0, 13.1, 13.37, 64-14
Posts: 679
Rep: 
|
You are welcome, glad that worked for you!
|
|
|
|
01-09-2013, 12:24 AM
|
#9
|
|
Senior Member
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,199
|
When storing or archiving stuff to CD/DVDs, stick the files within a tar container to preserve permissions.
|
|
|
|
01-09-2013, 02:50 PM
|
#10
|
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,589
|
For what its worth, the colors ls uses for various files are controlled by the LS_COLORS environment variable. They can be modified easily by using the dircolors command.
Short form, when dircolors is run, it reads the color settings from its configuration file and formats them into a command string that can be used to set the value of LS_COLORS. A simple line in your bashrc or similar startup file can be used to evaluate this output and set the variable automatically.
Then just modify the dircolors settings file to get the colors you want. dircolors -p will print out its default file settings with detailed comments on what does what.
Read man dircolors and info dircolors for more.
|
|
|
2 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:27 PM.
|
|
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
|
|