LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-14-2007, 09:44 PM   #1
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Rep: Reputation: 30
Broken symlinks aren't red anymore


I don't know how or when it happened, but my broken symlinks used to show up red in the console, but now it's showing up cyan just like the working symlinks.

How do I get the red broken symlinks back?

My ~/.dircolors file is currently showing "ln=01;36" which I assume is cyan for symlinks. How do I put in red for broken symlinks? I don't see anything in /etc/DIR_COLORS or /etc/profile.d/coreutils-dircolors.sh that would be helpful.

Any ideas?

Thanks...

LocoMojo
 
Old 04-14-2007, 10:24 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The value you want to set is for ORPHAN:

$ dircolors -p | grep ORPHAN
ORPHAN 40;31;01 # symlink to nonexistent file
 
Old 04-14-2007, 10:37 PM   #3
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by macemoneta
The value you want to set is for ORPHAN:

$ dircolors -p | grep ORPHAN
ORPHAN 40;31;01 # symlink to nonexistent file
Hmm, I get the same thing when I do 'dircolors -p | grep ORPHAN, yet broken symlinks are showing up cyan.

I took out my ~/.dircolors file and restarted my shell, still no go.

Any suggestions?

LocoMojo
 
Old 04-14-2007, 10:41 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
It's working here; what is your terminal type?

echo $TERM

It works with 'xterm' and 'screen' (when running the screen command) with gnome-terminal or an xterm.
 
Old 04-14-2007, 10:49 PM   #5
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by macemoneta
It's working here; what is your terminal type?

echo $TERM

It works with 'xterm' and 'screen' (when running the screen command) with gnome-terminal or an xterm.
echo $TERM is xterm.

I get the cyan broken symlinks in all my virtual terminals as well as the consoles.

Any other ideas?

LocoMojo
 
Old 04-14-2007, 10:58 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The only other thought is that your DIR_COLORS may be overriding the setting elsewhere in the file (by extension, for example).
 
Old 04-14-2007, 11:16 PM   #7
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by macemoneta
The only other thought is that your DIR_COLORS may be overriding the setting elsewhere in the file (by extension, for example).
Well, the broken symlinks I'm looking at have no extensions.

I've never touched the /etc/DIR_COLORS file and like I said earlier, I took my ~/.dircolors file out of commission so my LS_COLORS should be Slackware's default, yet all broken symlinks are cyan.

This is weird.

LocoMojo
 
Old 11-16-2007, 02:43 AM   #8
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Ok, after wasting an hour trying to get something to work on my system only to find out I had a problem with a broken symlink I decided to revisit this topic, bump it up in the hopes that someone will have some idea what's wrong. If my broken symlinks were red like it's supposed to be, I could have saved myself that hour and a headache.

It's funny, ls (aliased 'ls --color=auto -F -b -T 0') shows broken synlinks in cyan like working symlinks, but ls -l shows broken symlinks in red like it's supposed to.

Why are ls and ls -l treating broken symlinks differently?

Any help would be greatly appreciated.

LocoMojo
 
Old 11-16-2007, 03:36 AM   #9
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
That's happening here too. I guess when you launch "ls", it only reads the link name and that it's a link, so it doesn't check if the link exists or not. However, when you launch "ls -l" it reads the symlink contents and checks if the destination exists or not.
 
Old 11-16-2007, 09:36 AM   #10
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
It certainly sounds like that's what's happening, but it shouldn't be. Broken symlinks had always appeared red in ls for me.

I'm trying to figure out what's changed. I can't remember exactly when this problem started, but I wonder if it had anything to do with upgrading the coreutils package a while back.

LocoMojo

Update:

If I do 'ls brokensymlink' then it appears red. Just a simple 'ls' and it appears cyan in the directory...weird!

Last edited by LocoMojo; 11-16-2007 at 09:44 AM. Reason: update
 
Old 11-16-2007, 11:14 AM   #11
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Ok, I figured out the problem. It appears to be Slackware's version of ls.

I copied the ls executable from my wife's computer which is running PCLinuxOS over to my /bin directory (I backed up my /bin/ls, of course) and voila, ls works as it should and now my broken symlinks are showing up red when I do 'ls'.

LocoMojo

P.S. - I have coreutils-6.9-i486-1 installed.

Last edited by LocoMojo; 11-16-2007 at 11:19 AM. Reason: update
 
Old 11-16-2007, 04:37 PM   #12
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
I have yet another fresh vanilla installation of Slackware 12.0 and I cannot reproduce the problem. How can you state that the problem is "Slackware version of ls"?
 
Old 11-16-2007, 06:23 PM   #13
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
I verified it with Pat Volkerding. He said that something was changed upstream in coreutils.

LocoMojo
 
Old 11-17-2007, 07:39 AM   #14
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
Interesting.

But are you using Slackware 12.0 or Slackware-current? For the sake of curiosity I tried it in the two vanilla Slackware 12.0 installation the I have and I cannot reproduce the problem! And current changelogs shows no coreutils package updated. Pretty funny...
 
Old 11-17-2007, 08:58 AM   #15
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by crisostomo_enrico View Post
Interesting.

But are you using Slackware 12.0 or Slackware-current? For the sake of curiosity I tried it in the two vanilla Slackware 12.0 installation the I have and I cannot reproduce the problem! And current changelogs shows no coreutils package updated. Pretty funny...
I'm currently using Slackware 12 and I've had this problem since about the time I started this thread, last April or so.

It is odd that you can't reproduce the problem because apparently others can, including Pat. You're certainly more than welcome to contact him and verify it as well.

Out of curiosity, which coreutils package are you using?

LocoMojo
 
  


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
Broken symlinks in '/' dir after compile and checkinstall Haiyadragon Slackware 3 02-08-2005 10:55 AM
Broken symlinks technopasta Linux - Software 1 05-29-2004 07:13 AM
Problem: red hat 9 server doesnt turn on anymore.. Im desperate!! carolPrt Linux - General 1 04-22-2004 02:40 PM
red hat 9 multhithreading broken? stoffell Red Hat 3 09-23-2003 11:27 AM
Anymore Good Linux/Red Hat Forums? John_Saunders Linux - Newbie 3 06-15-2002 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration