Soft Linking
ln -s <source> <destination>
if a folder will go inside a preexisting destination folder then use
ln -s /path/to/source/ /path/to/destination/
if a folder will become a destination folder then use
ln -s /path/to/source/ /path/to/destination
when soft linking the source path must be reachable as-is from the destination ... for example:
if server folder resides at
~/dev/project/server
and we want to put a soft linked version of it under the~/dev/project/linkUnderMe/
folder as~/dev/project/linkUnderMe/server
~/dev/project/server
exists
~/dev/project/linkUnderMe/
exists
~/dev/project/linkUnderMe/server
this soft link is what we want to accomplish
then
go to
cd ~/dev/project/
and tryln -s ./server ./linkUnderMe/server
but it will NOT work!
because
./server
is not reachable from inside of./linkUnderMe/
as-is
ln -s ./../server ./linkUnderMe/server
will work
ln -s ~/dev/project/server ./linkUnderMe/server
will work
Last updated