z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Resolving a symbolic link in a path name

z/OS UNIX System Services User's Guide
SA23-2279-00

A symbolic link is a file that contains the path name for another file; that path name can be relative or absolute. If a symbolic link contains a relative path name, the path name is relative to the directory containing the symbolic link.

If you use a symbolic link as a component of a path name, during path name resolution the original path name is changed. How it changes depends on whether the symbolic link contains a relative or absolute path name. For example, consider the path name /u/turbo/dlg/lev1:
  • If dlg is a symbolic link containing the relative path name dbopt/pgma/src, dlg is replaced by the relative path name. This is how it resolves:
    /u/turbo/dlg/lev1   →   /u/turbo/dbopt/pgma/src/lev1
  • If dlg is a symbolic link containing the absolute path name /usr/bin/dbopt/pgma/src, then the components in the original path name that preceded dlg are replaced by the absolute path name in the symbolic link. This is how it resolves:
    /u/turbo/dlg/lev1   →   /usr/bin/dbopt/pgma/src/lev1
Up to eight symbolic links can be resolved in a path name.
Note: An external link is a type of symbolic link that refers to an object outside of the hierarchical file system. As used by the Network File System feature, an external link refers to an MVS™ data set name.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014