Symbolic link



         


A symbolic link (often symlink, especially in verb form, or soft link) is a special type of file in a Unix (or Unix-like) filesystem that allows a file entry to refer to another directory entry.

[Top]

Usage

Symbolic links are created with the hard links, there are no restrictions on where a symbolic link can point, it can refer to a file on another file system, to itself or to a file which does not even exist (e.g. when the target of the symlink is removed). Such problems will only be detected when the link is accessed.

[Top]

Storage of symbolic links

Early implementations of symbolic links would store the symbolic link information in standard disk blocks, much like regular files. The file merely contained the text string of the filename the link pointed to, and had a special attribute set indicating that it was a symbolic link rather than just a regular file. However, this arrangement proved to be somewhat slow and could waste disk space on small systems. An alternative called fast symlinks was created where the link text could be stored within extra space in the standard data structures used for storing filenames on disk. This simply means that short symbolic links can be referenced quickly. Systems with fast symlinks often fall back to using the older method if the path and filename stored in symlink is larger than a certain size (generally a few dozen bytes). The original style has been retroactively termed slow symlinks.

[Top]

Other operating systems

For people familiar with the Microsoft Windows operating system, a symbolic link is similar to a "shortcut", or an "alias" in the Mac OS operating system, or a "shadow" in the OS/2 operating system.

Another option under Windows are Junction Points (this requires NTFS 5.0), which are more similar to symbolic links than windows shortcuts.

This article was originally based on material from the Free On-line Dictionary of Computing and is used under the GFDL.





  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License