Understanding Symbolic Links

Symbolic Links

Symbolic links are like shortcuts or references to the actual file or directory. Most of the time these links are transparent when working with them through other programs. For example you could have a link to a directory to one hard drive inside a directory that lies on a different hard drive and an application will still treat it the same. Symbolic links are used all the time to link libraries and make sure files are in consistent places without moving or copying the original. Links are often used to “store” multiple copies of the same file in different places but still reference to one file.

Creating a Symbolic Link
To create a symbolic link in Linux we use this syntax:

ln -s /path/to/original/ /path/to/linkName

What happens if I edit the link? Any modifications to the linked file will be changed on the original file.
What happens if I delete the link? If you delete the link the original file is unchanged. It will still exist.
What happens if I delete the original file but not the link? The link will remain but will point to a file that does not exist. This is called an orphaned or dangling link.

Thanks to http://www.nixtutor.com/freebsd/understanding-symbolic-links/

About selvam4win

I am Selvam. I am very jolly person and frank one.

Posted on March 8, 2010, in PHP, SHELL Command, Shell Commands and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: