AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
UNLINK(2) UNLINK(2) NAME unlink - remove directory entry SYNOPSIS int unlink (path) char •path; DESCRIPTION Unlink removes the directory entry named by the path name pointed to be path . The named file is unlinked unless one or more of the following are true: A component of the path prefix is not a directory. [ENOTDffi[ The named file does not exist. [ENOENT] Search permission is denied for a component of the path prefix. [EACCES] Write permission is denied on the directory containing the link to be removed. [EACCES] The named file is a directory and the effective user ID of the process is not super-user. [EPERM[ The entry to be unlinked is the mount point for a mounted file system. [EBUSY] The entry to be unlinked is the last link to a pure procedure (shared text) file that is being executed. [ETXTBSY] The directory entry to be unlinked is part of a read-only file system. [EROFS] Path points outside the process's allocated address space. [EFAULT] When all links to a file have been removed and no process has the file open, the space occupied by the file is freed and the file ceases to exist. If one or more processes have the file open when the last link is removed, the removal is postponed until all references to the file have been closed. RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. SEE ALSO rm( 1), close(2), link(2), open(2). - 1-
- Page 725 and 726: PLOCK(2) PLOCK(2) NAME plock - lock
- Page 727: PROFIL ( 2 ) PROFIL ( 2 ) NAME prof
- Page 730 and 731: PTRACE (2) PTRACE (2) 4, 5 With the
- Page 732 and 733: (� �--- .
- Page 735 and 736: SEMCTL ( 2 ) SEMCTL ( 2 ) NAME semc
- Page 737 and 738: SEMGET (2) SEMGET (2) NAME semget -
- Page 739 and 740: SEMOP ( 2) SEMOP {2) NAME semop - s
- Page 741 and 742: SEMOP (2) SEMOP (2) Operation permi
- Page 743: SETPGRP (2) SETPGRP (2) NAME setpgr
- Page 747 and 748: SHMCTL (2) SHMCTL (2) NAME shmctl -
- Page 749 and 750: � ! SHMGET (2) SHMGET (2) NAME sh
- Page 751 and 752: SHMOP ( 2 ) SHMOP ( 2 ) NAME shmop
- Page 753 and 754: SIGNAL (2) SIGNAL (2) NAME signal -
- Page 755 and 756: SIGNAL (2) SIGNAL (2) Sig is an ill
- Page 757 and 758: STAT ( 2 ) STAT ( 2 ) NAME stat, fs
- Page 759 and 760: STIME(2) STIME(2) NAME stime - set
- Page 761 and 762: SYNC ( 2) SYNC (2) NAME sync - upda
- Page 763 and 764: SYSLOCAL ( 2) SYSLOCAL ( 2) NAME Sy
- Page 765: TIME ( 2) TIME(2) NAME time - get t
- Page 768 and 769: .�.· '··.· ·•. J '·· -,
- Page 771 and 772: UMASK( 2 ) UMASK ( 2 ) NAME umask -
- Page 773 and 774: UMOUNT (2) UMOUNT (2) NAME umount -
- Page 775: UNAME ( 2 ) UNAME (2) NAME uname -
- Page 781: ,� UTIME(2) UTIME (2) NAME utime
- Page 784 and 785: WAIT (2) WAIT (2) SEE ALSO exec(2),
- Page 786 and 787: WRITE(2) WRITE (2) RETURN VALUE Upo
- Page 788 and 789: INTR0 (3) INTR0 (3) SEE ALSO ar(l),
- Page 791: ABORT ( 3C ) ABORT ( 3C ) NAME abor
- Page 795: ASSERT (3X) ASSERT (3X) NAME assert
- Page 799 and 800: BESSEL (3M) BESSEL (3M) NAME jO, j
- Page 801: BSEARCH ( 3C ) BSEARCH ( 3C ) NAME
- Page 805 and 806: CONV( 3C ) CONV ( 3C ) NAME toupper
- Page 807: CRYPT (3C) (Domestic Version Only )
- Page 811 and 812: CTIME ( 3C ) CTIME ( 3C ) NAME ctim
- Page 813: CTYPE ( 3C ) CTYPE ( 3C ) NAME isal
- Page 816 and 817: CURSES (3) no raw() overlay(winl,wi
- Page 818 and 819: I�
- Page 820 and 821: DIAL ( 3C ) DIAL ( 3C ) required. T
- Page 822 and 823: DRAND48 ( 3C ) DRAND48 ( 3C ) a = 5
- Page 824 and 825: � --- ·
UNLINK(2) UNLINK(2)<br />
NAME<br />
unlink - remove directory entry<br />
SYNOPSIS<br />
int unlink (path)<br />
char •path;<br />
DESCRIPTION<br />
Unlink removes the directory entry named by the path name<br />
pointed to be path .<br />
The named file is unlinked unless one or more of the following are<br />
true:<br />
A component of the path prefix is not a directory.<br />
[ENOTDffi[<br />
The named file does not exist. [ENOENT]<br />
Search permission is denied for a component of the path<br />
prefix. [EACCES]<br />
Write permission is denied on the directory containing the<br />
link to be removed. [EACCES]<br />
The named file is a directory and the effective user ID of<br />
the process is not super-user. [EPERM[<br />
The entry to be unlinked is the mount point for a<br />
mounted file system. [EBUSY]<br />
The entry to be unlinked is the last link to a pure procedure<br />
(shared text) file that is being executed.<br />
[ETXTBSY]<br />
The directory entry to be unlinked is part of a read-only<br />
file system. [EROFS]<br />
Path points outside the process's allocated address space.<br />
[EFAULT]<br />
When all links to a file have been removed and no process has the<br />
file open, the space occupied by the file is freed and the file ceases<br />
to exist. If one or more processes have the file open when the last<br />
link is removed, the removal is postponed until all references to<br />
the file have been closed.<br />
RETURN VALUE<br />
Upon successful completion, a value of 0 is returned. Otherwise, a<br />
value of -1 is returned and errno is set to indicate the error.<br />
SEE ALSO<br />
rm( 1), close(2), link(2), open(2).<br />
- 1-