You are not logged in.

#1 2008-10-16 14:00:45

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

[Solved] Help spotting broken links while using the shell

Hello, here I am again with another doubt (probably a very basic one roll ).
Is there any way to distinguish broken links from "good" links on the shell?
I'm using xfce and in thunar its very easy to spot that, it says broken link but I can't figure out how to see it easily on the shell.
I'm using bash by the way, just the way it comes out of the install.

Thanks in advance smile

Last edited by R00KIE (2008-10-16 21:41:45)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#2 2008-10-16 17:13:56

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [Solved] Help spotting broken links while using the shell

If you're using colored ls output, I think it shows broken links with a different color than good links by default.

Offline

#3 2008-10-16 20:32:09

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] Help spotting broken links while using the shell

Unfortunately no, I have tried with --color=always and with --color=auto its exactly the same thing, last one is used in the default ls alias (alias ls='ls -lh --color=auto'). I have seen this functionality in other distros, maybe if I fiddle with the file that decides which color to give to what will do the trick but I have no idea where to start sad
It would be nice to see this "addition" included by default in arch, little things like this do matter a lot smile

More on this ....
If I do dircolors -p both in arch and on a system where this is working the output looks the same, particularly this

ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file

... so I'm really lost here sad

Ok ... I think I solved it myself, so here it goes. In arch things are getting colorized by default but I have no clue where and how it selects the colors and on the other system I have tried (Fedora 7) the "default" isn't the same as in the dircolors default, but here there is a file with custom colors.
Anyway to solve this I have added

eval `dircolors`

to my .bashrc and that did the trick, I have also added it into /etc/profile.bash just in case I create more users and want it to be already set.

Last edited by R00KIE (2008-10-16 21:41:24)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB