symlink(4)
NAME
symlink − symbolic link
DESCRIPTION
A symbolic link is a type of file that indirectly refers to ("points to") a path name. Also known as a soft link, a symbolic link contains a relative or absolute path name. If a symbolic link to a relative path name is encountered during path name interpretation, the contents of the symbolic link replaces the symbolic link component and are expanded into the path name being interpreted. If a symbolic link to an absolute path name is encountered, the contents of the symbolic link replaces all components up to and including the symbolic link, and is expanded into the remainder of the path name.
Thus, given path name /a/b/c/d,where c is a symbolic link to ../x/y, the original path name is interpreted as /a/b/../x/y/d. If, instead, c is a symbolic link to an absolute path name such as /v/w, the same path name would be interpreted as /v/w/d. All symbolic links are interpreted in this manner except when the symbolic link is the last component of a path name passed as a parameter to one of the following system calls: readlink(2), rename(2), symlink(2), unlink(2), chown(2) and lstat(2). With these calls, the symbolic link itself is accessed or affected.
Unlike normal (hard) links, a symbolic link can refer to any arbitrary path name and can span different logical devices (volumes). The path name can be that of any type of file (including a directory or another symbolic link), or it can even be invalid if no such path exists in the system. Thus it is possible to make symbolic links point to themselves or other symbolic links in such a way that they form a closed loop. The system detects this situation by limiting the number of symbolic links it traverses while translating a path name. The mode and ownership of a symbolic link is ignored by the system, which means that chmod(1) affects the actual file; not the file containing the symbolic link.
Symbolic links can be created using ln(1) or symlink(2).
AUTHOR
symlink was developed by HP and the University of California, Berkeley.
SEE ALSO
cp(1), symlink(2), readlink(2), link(2), stat(2), mknod(1M).
Hewlett-Packard Company — HP-UX Release 8.05: June 1991