сряда, 10 ноември 2010 г.

How to make symbolic link that works!

I admit, I have some problems grasping the use of symbolic links in Linux. It just never works for me, no matter what I type. So here is the best piece of advice I found on this, ever:

How do I create a symbolic link?

ln -s [TARGET DIRECTORY OR FILE] ./[SHORTCUT]

For example:

ln -s /usr/local/apache/logs ./logs

This points a symbolic link "./logs" to "/usr/local/apache/logs" source

Why this is cool?
Because it creates a new file called "logs", which links directly to the directory you want to. I used it with Wine, because it didn't allow me to install a game in other directory than home, so what I did was
ln -s /media/D/dir ~/.wine/dosdevices/t:
And voila! It worked! Here t: is a letter that I didn't have before - it created this new shortcut "file" and this time, the link was fine and the game was installed on another harddrive (which was the actual point of the exercise). Weeee!

Няма коментари:

Публикуване на коментар