Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ link(S) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ln(C)

unlink(S)



     LINK(S)                  XENIX System V                   LINK(S)



     Name
          link - Links a new filename to an existing file.

     Syntax
          int link (path1, path2)
          char *path1, *path2;

     Description
          path1 points to a pathname naming an existing file.  path2
          points to a pathname giving the new filename to be linked.
          link makes a new link by creating a new directory entry for
          the existing file using the new name.  The contents of the
          existing file can then be accessed using either name.

          link will fail and no link will be created if one or more of
          the following are true:

               A component of either path prefix is not a directory.
               [ENOTDIR]

               A component of either path prefix does not exist.
               [ENOENT]

               A component of either path prefix denies search
               permission.  [EACCES]

               The file named by path1 does not exist.  [ENOENT]

               The link named by path2 already exists.  [EEXIST]

               The file named by path1 is a directory and the
               effective user ID is not super-user.  [EPERM]

               The link named by path2 and the file named by path1 are
               on different logical devices (file systems).  [EXDEV]

               path2 points to a null pathname.  [ENOENT]

               The requested link requires writing in a directory with
               a mode that denies write permission.  [EACCES]

               The requested link requires writing in a directory on a
               read-only file system.  [EROFS]

               path points outside the process' allocated address
               space.  [EFAULT]

               The maximum number of lines to a file is exceeded.
               [EMLINK]

               The directory to contain the file cannot be extended.
               [ENOSPC]



     Page 1                                           (printed 8/7/87)





     LINK(S)                  XENIX System V                   LINK(S)



     Return Value
          When the linking procedure is successfully completed, a
          value of 0 is returned.  Otherwise, a value of -1 is
          returned and errno is set to indicate the error.

     See Also
          ln(C), unlink(S)
















































     Page 2                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026