home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / man / cat2 / link.0 < prev    next >
Text File  |  1993-12-07  |  4KB  |  133 lines

  1.  
  2. LINK(2)                    UNIX Programmer's Manual                    LINK(2)
  3.  
  4. NNAAMMEE
  5.      lliinnkk - make a hard file link
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<uunniissttdd..hh>>
  9.  
  10.      _i_n_t
  11.      lliinnkk(_c_o_n_s_t _c_h_a_r _*_n_a_m_e_1, _c_o_n_s_t _c_h_a_r _*_n_a_m_e_2)
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The lliinnkk() function call atomically creates the specified directory entry
  15.      (hard link) _n_a_m_e_2 with the attributes of the underlying object pointed at
  16.      by _n_a_m_e_1 If the link is successful: the link count of the underlying ob­
  17.      ject is incremented; _n_a_m_e_1 and _n_a_m_e_2 share equal access and rights to the
  18.      underlying object.
  19.  
  20.      If _n_a_m_e_1 is removed, the file _n_a_m_e_2 is not deleted and the link count of
  21.      the underlying object is decremented.
  22.  
  23.      _N_a_m_e_1 must exist for the hard link to succeed and both _n_a_m_e_1 and _n_a_m_e_2
  24.      must be in the same file system.  Unless the caller is the super­user,
  25.      _n_a_m_e_1 may not be a directory.
  26.  
  27. RREETTUURRNN VVAALLUUEESS
  28.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  29.      of ­1 is returned and _e_r_r_n_o is set to indicate the error.
  30.  
  31. EERRRROORRSS
  32.      LLiinnkk() will fail and no link will be created if: are true:
  33.  
  34.      [ENOTDIR]     A component of either path prefix is not a directory.
  35.  
  36.      [EINVAL]      Either pathname contains a character with the high­order
  37.                    bit set.
  38.  
  39.      [ENAMETOOLONG]
  40.                    A component of either pathname exceeded 255 characters, or
  41.                    entire length of either path name exceeded 1023 characters.
  42.  
  43.      [ENOENT]      A component of either path prefix does not exist.
  44.  
  45.      [EACCES]      A component of either path prefix denies search permission.
  46.  
  47.      [EACCES]      The requested link requires writing in a directory with a
  48.                    mode that denies write permission.
  49.  
  50.      [ELOOP]       Too many symbolic links were encountered in translating one
  51.                    of the pathnames.
  52.  
  53.      [ENOENT]      The file named by _n_a_m_e_1 does not exist.
  54.  
  55.      [EEXIST]      The link named by _n_a_m_e_2 does exist.
  56.  
  57.      [EPERM]       The file named by _n_a_m_e_1 is a directory and the effective
  58.                    user ID is not super­user.
  59.  
  60.      [EXDEV]       The link named by _n_a_m_e_2 and the file named by _n_a_m_e_1 are on
  61.                    different file systems.
  62.  
  63.      [ENOSPC]      The directory in which the entry for the new link is being
  64.                    placed cannot be extended because there is no space left on
  65.  
  66.                    the file system containing the directory.
  67.  
  68.      [EDQUOT]      The directory in which the entry for the new link is being
  69.                    placed cannot be extended because the user's quota of disk
  70.                    blocks on the file system containing the directory has been
  71.                    exhausted.
  72.  
  73.      [EIO]         An I/O error occurred while reading from or writing to the
  74.                    file system to make the directory entry.
  75.  
  76.      [EROFS]       The requested link requires writing in a directory on a
  77.                    read­only file system.
  78.  
  79.      [EFAULT]      One of the pathnames specified is outside the process's al­
  80.                    located address space.
  81.  
  82. SSEEEE AALLSSOO
  83.      symlink(2),  unlink(2)
  84.  
  85. SSTTAANNDDAARRDDSS
  86.      LLiinnkk() is expected to conform to IEEE Std 1003.1­1988 (``POSIX'').
  87.  
  88. 4th Berkeley Distribution       March 10, 1991                               2
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.