Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


symlink — symbolic link


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 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 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)).


symlink was developed by HP and the University of California, Berkeley.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.