Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using the ln command to create a symbolic link to a directory using bash, I went to the directory I wanted to make a link and used the following command:

ln -s C#/ ~/Projetos

This would create a link to ~/media/Projects/C# in the ~/Projetos folder.

But once I cd to my home, the folder is displayed in red color and I can't access it, what's happening here?

enter image description here

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can check the link using ls -l (which is usually aliased to just ll). You will see something like this:

 user42@localhost$ ll ~/Projetos
 lrwxrwxrwx 1 user42 user42    3 Sep 26 19:48 Projetos -> C#/

this means, that using the path /home/user42/Projetos will be substituted with /home/user42/C#. This path does not exist.

You probably wanted to use either

  • a correct relative link like ln -s media/Projects/C# ~/Projetos
  • or an absolute link like in ln -s $PWD/C#/ ~/Projetos
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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