gtpo1m5yOperations

ZFILE ln-Create a Link to a File

Use this command to create a link to a file.

Note:
A link is either a hard link or a symbolic link. A hard link consists of one physical file and two or more i-nodes pointing to that file. The file is not physically deleted until the last link is deleted.

A symbolic link consists of one physical file, one i-node pointing to that file, and one or more i-nodes that specify the path to the physical file. The link can be to a regular file or to a directory. When a reference is made through a symbolic link, the TPF system follows the symbolic link chain until the i-node that points to the physical file is found. When the physical file is deleted, the links remain but return file not found errors if they are followed. If the physical file is re-created, the links point to the new file with no intervention.

Requirements and Restrictions

Format




-f
forces existing links to be removed so a new link can be created.

-s
creates a symbolic link that points to the name of the file, not the file location. If you do not specify this parameter, a hard link is created.

source
is the path name of the file to which you want to create a link. This is the physical file, directory, or link that already exists.

link
is the path name of the file that will contain the link. This is the link that you want to create.

Additional Information

Examples

In the following example, a symbolic link is created in newfile that points to olddir/file.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE ln -s olddir/file newfile                                                      |
|                                                                                             |
|System: FILE0003I 15:31:22 ln -s olddi... COMPLETED SUCCESSFULLY.  NO OUTPUT TO DISPLAY      |
+---------------------------------------------------------------------------------------------+

Related Information

See Information Technology--Portable Operating System Interface for Computer Environments (POSIX) for more information about the POSIX standards.