You are not logged in.

#1 2012-07-14 17:37:25

solstice
Member
Registered: 2006-10-27
Posts: 245
Website

/lib wrongly shown as red broken symlink in ls output

hi.

So, I made the update of glibc with the switch/transition to /usr/lib. All went all. My system is still running fine!

However I noticed that a simple ls / shows the lib symlink in red as if it was a broken symlink. And it is not.
So, I wonder why it shown like that.
In fact, I don't why, a long time ago, I have added
eval $(dircolors)
to my ~/.bashrc to get colors on output of ls.

Looking at documentation of dircolors, it shows link in red for orphan:
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file

well, /lib is a symlink to an existent file and /usr/lib is stat'able. So, I really don't understand.

Anyway, I will remove eval $(dircolors) from my ~/.bashrc. Because when I unset LS_COLORS, the output has still colors, and no red link for /lib.

Last edited by solstice (2012-07-14 17:39:59)

Offline

#2 2012-07-14 17:39:28

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: /lib wrongly shown as red broken symlink in ls output

file /lib


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2012-07-14 18:13:53

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: /lib wrongly shown as red broken symlink in ls output

solstice wrote:

hi.

So, I made the update of glibc with the switch/transition to /usr/lib. All went all. My system is still running fine!

However I noticed that a simple ls / shows the lib symlink in red as if it was a broken symlink. And it is not.
So, I wonder why it shown like that.
In fact, I don't why, a long time ago, I have added
eval $(dircolors)
to my ~/.bashrc to get colors on output of ls.

Looking at documentation of dircolors, it shows link in red for orphan:
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file

well, /lib is a symlink to an existent file and /usr/lib is stat'able. So, I really don't understand.

Anyway, I will remove eval $(dircolors) from my ~/.bashrc. Because when I unset LS_COLORS, the output has still colors, and no red link for /lib.

The link is relative, not absolute:

lib -> usr/lib/

if you do a:

cd /
ls -l 

it should show the link OK.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#4 2012-07-14 20:14:01

solstice
Member
Registered: 2006-10-27
Posts: 245
Website

Re: /lib wrongly shown as red broken symlink in ls output

@Mektub
ah yes you are right. It dind't know ls was that stupid and show broken link for relative symlink.

Offline

#5 2012-07-14 20:22:37

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: /lib wrongly shown as red broken symlink in ls output

It's already fixed for the next release of coreutils.

Offline

Board footer

Powered by FluxBB