what does it mean a red filename shown with black background?

17

0

I have a compilation problem, and when I check my lib/ directory I get this output from "ls":

ls output

What the red/black combination mean?

I checked in the output of "dircolors -p" as suggested here (What does it mean for the file name to be shown with red background), but I could not find an answer.

Moreover, what the question marks at the place of permissions/user/size/timestamp mean?

Thanks for your help

rmbianchi

Posted 2013-01-29T13:31:16.863

Reputation: 273

Answers

19

What you have there is a dangling symlink, or a symlink pointing to a file or directory which no longer exists.

A symlink itself really has no filesize, because it isn't a file. Symlinks are stored within the inodes themselves, meaning they have no real contents or size, but are instead pointers to other files on the disk.

The output of file libCLHEP-Exceptions-2.1.3.1.a should reveal where it's pointing to.

Xyon

Posted 2013-01-29T13:31:16.863

Reputation: 1 499

1ls -l should also print the symlink target, which it doesn't seem to do here. – Stefan Seidel – 2013-01-29T13:44:28.250

1This is true in most cases, but I've seen it fail to do that in a couple of obscure circumstances. file is usually a lot better at working out what's going on with a particular, erm, file. – Xyon – 2013-01-29T13:45:43.377

Many thanks Xyon, I didn't know the file command: it's very useful indeed. +1! – rmbianchi – 2013-01-30T13:30:39.623

3

At the first look, it does look like a broken link, but since it is supposed to be a regular file, it might be a file system corruption. Try to do a fsck on the file system and then try to delete this file if it is still there.

Stefan Seidel

Posted 2013-01-29T13:31:16.863

Reputation: 8 812

1Thanks for your answer Stefan, +1. Actually I tried to remove the broken link, but rm gave a "no such file or directory" error. was very strange, actually, because the link was broken, the file not there, and rm still refused to delete the link... Anyway, I removed the whole folder, and that fixed the problem. – rmbianchi – 2013-01-30T13:32:53.413