SlackwareThis 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.
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.
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.
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?
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.
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
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
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
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"?
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
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...
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.