0

I was just hanging around in my dirs and I found some dirs that are displaying a red alert, all of them are related with jvm. I supposed that it could be a problem with jdk or some wrong installation process I may have done. My questions are: 1. What are they and where do they come from? 2. How can I delete them or at least make the red alert disappear?

Here are they: enter image description here enter image description here

Thank you very much for your help!

Ps: I have a Dell Latitude E6230 with Linux 4.19.79-1-MANJARO.

0

Short answer

  1. They are dead symbolic links
  2. You can remove the red either by deleting the link (the bit on the left of the arrow) with rm, fix the link by replacing the target file (the bit on the right of the arrow) or by changing the link to point to somehthing else.

Long answer

In ls, when you see something like b -> a, that means that b is a 'symbolic link' to a.

If I create a file a in the terminal echo "test" > a, then create b as a symbolic link to a ln -s a b, the output of ls would look like this (using screenshots to illustrate colour):

normal ls output

And if you cat b you will see test.

Now if I remove a, the source of our link rm a, it looks like this (my environment is setup differently to yours hence I don't have a red background):

ls dead sym link

If you remember, a contained the text test, if I now look at the contents of b I get an error:

cat: b: No such file or directory

The symlink points to a, which doesn't exist and so when trying to open the file b, it appears like it just doesn't exist.

Finally to clean up you can just rm b.

Dead symlinks are not harmful or dangerous, you can leave them and nothing bad will come of it.

The root cause of how it happened, at a guess, you installed something at some point which created the link to a file from the thing you installed. Then you uninstalled it and the uninstall process didn't clean up the symlinks it made.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.