symlink.4 (2010 09)

s
symlink(4) symlink(4)
NAME
symlink - symbolic link
DESCRIPTION
A symbolic (or soft ) link is a file whose name indirectly refers (points) to a relative or absolute path
name.
During path name interpretation, a symbolic link to a relative path name is expanded to the path name
being interpreted, and a symbolic link to an absolute path name is replaced with the path name being
interpreted.
Thus, given the path name
/a/b/c/d:
If
c is a symbolic link to a relative path name such as
../x/y, the path name is interpreted as
/a/b/../x/y/d.
If
c is a symbolic link to an absolute path name such as
/v/w, the path name is interpreted as
/v/w/d.
All symbolic links are interpreted in this manner, with one exception: when the symbolic link is the last
component of a path name, it is passed as a parameter to one of the system calls:
readlink, rename,
symlink, unlink, chown,or lstat
(see 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), and may be
invalid if no such path exists in the system. (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 lim-
iting 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
affects
the actual file, but not the file containing the symbolic link (see chmod(1)).
Symbolic links can be created using
ln or symlink (see ln(1) and 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).
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)