Ubuntu – Creating a symbolic link to a directory

bashcommand linesymbolic-link

I have a directory to which I want to create a symbolic link. The commands I used were:

cd workspace_b4a
cd android-sdk-linux
ln -sv build-tools/20.0.0/lib/ platform-tools/lib

The output was:

‘platform-tools/lib’ -> ‘build-tools/20.0.0/lib/’

However, Nautilus says that platform-tools/lib is a broken link and ls -l platform-tools/lib shows the both build-tools/20.0.0/lib/ and platform-tools/lib in red. What am I doing wrong?

Best Answer

Thanks everyone for your suggestions. I found it easiest to understand how to do it (though I still don't understand the logic behind it) with:

cd ~/workspace_b4a
cd android-sdk-linux
cd platform-tools
ln -sv ../build-tools/20.0.0/lib/ .
Related Question