Penguin
Note: You are viewing an old revision of this page. View the current version.

A symbolic link. This is a file that points to another file, simply by storing the target file's path which may be relative to the location of the SymLink, or absolute. It is also marked as special type of file, just like directories, FIFOs etc.

Using links (whether they be hard or symbolic ones) you can break the strictly hierarchical structure of a FileSystem.

Most file related system calls like open(2) and stat(2) will operate on the referenced file instead of the link itself. Some of them have "SymLink-aware" counterparts that will operate on the SymLink itself instead, eg lstat(2) which stat(2)s the link instead of the linkee.

Though similar on the surface, SymLinks have little to do with Windows' "shortcuts" which are not supported at system call level. They're simply another plain file - for an application to work on the linkee rather than the shortcut itself, the programmer must add support for reading and honouring shortcuts to the application. Unlike SymLinks they're therefor rather limited in usefulness.

On Linux SymLinks are created with ln(1).


The common error message "link: Too many levels of symbolic links" usually means that you have a link that points to itself (directly or indirectly). StuartYeates