z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


symlink

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-symlink--pathname--linkname---------------------------------><

Function

symlink invokes the symlink callable service to create a symbolic link to a path name. This creates a symbolic link file.

Parameters

pathname
A path name for the file for which you are creating a symbolic link.
linkname
The path name for the symbolic link.

Usage notes

Like a hard link (described in link), a symbolic link allows a file to have more than one name. The presence of a hard link guarantees the existence of a file, even after the original name has been removed. A symbolic link, however, provides no such assurance; in fact, the file identified by pathname need not exist when the symbolic link is created. In addition, a symbolic link can cross file system boundaries.

When a component of a path name refers to a symbolic link rather than to a directory, the path name contained in the symbolic link is resolved. If the path name in the symbolic link begins with / (slash), the symbolic link path name is resolved relative to the process root directory. If the path name in the symbolic link does not begin with /, the symbolic link path name is resolved relative to the directory that contains the symbolic link.

If the symbolic link is not the last component of the original path name, remaining components of the original path name are resolved from there. When a symbolic link is the last component of a path name, it may or may not be resolved. Resolution depends on the function using the path name. For example, a rename request does not have a symbolic link resolved when it appears as the final component of either the new or old path name. However, an open request does have a symbolic link resolved when it appears as the last component. When a slash is the last component of a path name, and it is preceded by a symbolic link, the symbolic link is always resolved.

Because the mode of a symbolic link cannot be changed, its mode is ignored during the lookup process. Any files and directories to which a symbolic link refers are checked for access permission.

Example

To create a symbolic link named /bin for the file /v.1.1.0/bin:
"symlink /v.1.1.0/bin /bin"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014