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.






