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


link

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

Read syntax diagramSkip visual syntax diagram
>>-link--old_path--new_path------------------------------------><

Function

link invokes the link callable service to create a hard link to a file (not a directory); that is, it creates a new name for an existing file. The new name does not replace the old one.

Parameters

old_path
A path name, the current name for the file.
new_path
A path name, the new name for the file.

Usage notes

  1. The link service creates a link named new_path to an existing file named old_path. This provides an alternate path name for the existing file, so that the file can be accessed by the old name or the new name. The link can be stored in the same directory as the original file, or in a different directory.
  2. The link and the file must be in the same file system.
  3. If the link is created successfully, the service increments the link count of the file. The link count shows how many links exist for a file. If the link is not created successfully, the link count is not incremented.
  4. Links are allowed only to files, not to directories.
  5. If the link is created successfully, the change time of the linked-to file is updated and the change and modification times of the directory that holds the link are updated.

Example

To create the hard link /usr/bin/grep to the file /bin/grep:
"link /bin/grep /usr/bin/grep"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014