So, you’ve decided you want to setup a symlink, well look no further! It is a fun tool that is most commonly used to set up a shortcut or a filesystem redirect.  Well the full explaination of one and how it works can be found at this page .  But really, it is quite simple:

ln -s target linkname

target=where you want to the shortcut to go

linkname=where you want to name the shortcut

Here are a couple examples:

Say you’re tired of typing in a full path to something like a web root, you can setup something like this:

ln -s /var/www/vhosts/google.com/httpdocs/ /root/google.com

Then when you log in as root, you can just do cd google.com and be dumped into web root

Alternatively, say you moved mission critical files for a program like libs to a different dir for tidiness reasons and adjusting the code would take too long, you can just symlink it to save time!

ln -s newdir olddir

so ln -s /usr/local/php5 /usr/local/php4 would direct all calls to the php4 dir to the php5 dir, where all of your new libs are.

Posted by Drwndx, filed under Geek |
Date: August 18, 2008, 12:40 pm |

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.