Monday, February 11, 2013

Linux: Creating a symbolic link



I am trying to create a link to my site directory instead of typing the whole path every time I transfer my files. This is what I've found. Symbolic link is indeed very useful!

the simple syntax is

         ln -s [target directory or file] [symlink shortcut]


But in case you want to forcibly replace an existing symbolic link, you can use

ln -sfn /new/target /path/to/symlink


Explanations can be found here


1 comment:

joyap said...

ln -sfn /target /home/user/shortcut folder

WHAT LESSONS HAVE I LEARNED?

Today, I bumped into this entry in my PSDP written nine (9) years ago...  WHAT LESSONS HAVE I LEARNED? Being poor is not an excuse to succee...