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

  1.  
  2. UNLINK(2)                  UNIX Programmer's Manual                  UNLINK(2)
  3.  
  4. NNAAMMEE
  5.      uunnlliinnkk - remove directory entry
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<uunniissttdd..hh>>
  9.  
  10.      _i_n_t
  11.      uunnlliinnkk(_c_o_n_s_t _c_h_a_r _*_p_a_t_h)
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The uunnlliinnkk() function removes the link named by _p_a_t_h from its directory
  15.      and decrements the link count of the file which was referenced by the
  16.      link.  If that decrement reduces the link count of the file to zero, and
  17.      no process has the file open, then all resources associated with the file
  18.      are reclaimed.  If one or more process have the file open when the last
  19.      link is removed, the link is removed, but the removal of the file is de­
  20.      layed until all references to it have been closed.
  21.  
  22. RREETTUURRNN VVAALLUUEESS
  23.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  24.      of ­1 is returned and _e_r_r_n_o is set to indicate the error.
  25.  
  26. EERRRROORRSS
  27.      The uunnlliinnkk() succeeds unless:
  28.  
  29.      [ENOTDIR]       A component of the path prefix is not a directory.
  30.  
  31.      [EINVAL]        The pathname contains a character with the high­order bit
  32.                      set.
  33.  
  34.      [ENAMETOOLONG]  A component of a pathname exceeded 255 characters, or an
  35.                      entire path name exceeded 1023 characters.
  36.  
  37.      [ENOENT]        The named file does not exist.
  38.  
  39.      [EACCES]        Search permission is denied for a component of the path
  40.                      prefix.
  41.  
  42.      [EACCES]        Write permission is denied on the directory containing
  43.                      the link to be removed.
  44.  
  45.      [ELOOP]         Too many symbolic links were encountered in translating
  46.                      the pathname.
  47.  
  48.      [EPERM]         The named file is a directory and the effective user ID
  49.                      of the process is not the super­user.
  50.  
  51.      [EPERM]         The directory containing the file is marked sticky, and
  52.                      neither the containing directory nor the file to be re­
  53.                      moved are owned by the effective user ID.
  54.  
  55.      [EBUSY]         The entry to be unlinked is the mount point for a mounted
  56.                      file system.
  57.  
  58.      [EIO]           An I/O error occurred while deleting the directory entry
  59.                      or deallocating the inode.
  60.  
  61.      [EROFS]         The named file resides on a read­only file system.
  62.  
  63.      [EFAULT]        _P_a_t_h points outside the process's allocated address
  64.                      space.
  65.  
  66. SSEEEE AALLSSOO
  67.      close(2),  link(2),  rmdir(2)
  68.  
  69. HHIISSTTOORRYY
  70.      An uunnlliinnkk function call appeared in Version 6 AT&T UNIX.
  71.  
  72. 4th Berkeley Distribution       March 10, 1991                               2
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  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.