Jun.11
2009

I can never seem to remember all these Linux commands. I just had to look up how to create a symbolic link. Here it is for reference:

ln -s /path/of/original/file /path/of/linked/file

This will point a file or directory to another file or directory. Why would you want to do this? Well, on our web server we have multiple websites and they share a directory of common include files. So instead of using the server path to get the files, we can just link the local include directory to the global include directory and access the files relatively. It just makes things cleaner.

Here’s how to unlink a symbolic link. Remember not to use a trailing slash. rm will also work.

unlink /path/of/symbolic/link
rm /path/of/symbolic/link

No Comment.

Add Your Comment

Spam Protection by WP-SpamFree

Looking for something?

Use the form below to search the site: