Directories that don't exist

Today, I was trying different things with the ls command and noticed an entry that was in a strange color. I narrowed it down and ls shows two entries:

bart@UNIVAC:~> ls -l Rou*
lrwxrwxrwx 1 bart users 12 Nov  1 12:58 Router -> /mnt/Hardin/

Dolphin doesn’t show either of these items. Router is obviously a link but it doesn’t show in my home directory. which was the current directory when I issued the command.

There in no directory named Hardin in the /mnt directory.

Does the strange color mena it’s a link that goes nowhere?

Can I safely delete these entries from the command line?

Bart

If that’s in your home directory, then you probably put it there for convenience and forgot to remove it when it was no longer useful.

I’ll guess.

At some time in the past, you mounted a partition (or external drive) on “/mnt”. The “Hardin” as a directory in whatever you mounted. And you were using it enough that you found it convenient to create that symbolic link.

Sure, you can remove it. If you ever want it back, it’s easy enough to recreate.

When create a link pointing nowhere – pointing to nothing – the “strange colour” I get is “yellow with a red highlight” …


 > ln -s /mnt/sdgsgfj ./something
 > l something
lrwxrwxrwx 1 xxx users 12 17. Mär 11:45 something -> /mnt/sdgsgfj
 > 
 > file something 
something: broken symbolic link to /mnt/sdgsgfj
 > 
 > unlink something
 > 

The Konsole developers have possibly chosen this colour scheme because of the general acceptance that, “red means danger/warning” …
[HR][/HR]BTW, yes, links can be “removed” (rm) but, the use of “unlink” is considered to be, from a system perspective, more reliable.

Done! Thanks!

Bart