unlink.2 (108028) | unlink.2 (108087) |
---|---|
1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 | 1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 |
33.\" $FreeBSD: head/lib/libc/sys/unlink.2 108028 2002-12-18 09:22:32Z ru $ | 33.\" $FreeBSD: head/lib/libc/sys/unlink.2 108087 2002-12-19 09:40:28Z ru $ |
34.\" 35.Dd June 4, 1993 36.Dt UNLINK 2 37.Os 38.Sh NAME 39.Nm unlink 40.Nd remove directory entry 41.Sh LIBRARY --- 12 unchanged lines hidden (view full) --- 54file which was referenced by the link. 55If that decrement reduces the link count of the file 56to zero, 57and no process has the file open, then 58all resources associated with the file are reclaimed. 59If one or more process have the file open when the last link is removed, 60the link is removed, but the removal of the file is delayed until 61all references to it have been closed. | 34.\" 35.Dd June 4, 1993 36.Dt UNLINK 2 37.Os 38.Sh NAME 39.Nm unlink 40.Nd remove directory entry 41.Sh LIBRARY --- 12 unchanged lines hidden (view full) --- 54file which was referenced by the link. 55If that decrement reduces the link count of the file 56to zero, 57and no process has the file open, then 58all resources associated with the file are reclaimed. 59If one or more process have the file open when the last link is removed, 60the link is removed, but the removal of the file is delayed until 61all references to it have been closed. |
62The |
|
62.Fa path | 63.Fa path |
64argument |
|
63may not be a directory. 64.Sh RETURN VALUES 65.Rv -std unlink 66.Sh ERRORS 67The 68.Fn unlink 69succeeds unless: 70.Bl -tag -width Er --- 21 unchanged lines hidden (view full) --- 92The entry to be unlinked is the mount point for a 93mounted file system. 94.It Bq Er EIO 95An I/O error occurred while deleting the directory entry 96or deallocating the inode. 97.It Bq Er EROFS 98The named file resides on a read-only file system. 99.It Bq Er EFAULT | 65may not be a directory. 66.Sh RETURN VALUES 67.Rv -std unlink 68.Sh ERRORS 69The 70.Fn unlink 71succeeds unless: 72.Bl -tag -width Er --- 21 unchanged lines hidden (view full) --- 94The entry to be unlinked is the mount point for a 95mounted file system. 96.It Bq Er EIO 97An I/O error occurred while deleting the directory entry 98or deallocating the inode. 99.It Bq Er EROFS 100The named file resides on a read-only file system. 101.It Bq Er EFAULT |
100.Fa Path | 102The 103.Fa path 104argument |
101points outside the process's allocated address space. 102.El 103.Sh SEE ALSO 104.Xr close 2 , 105.Xr link 2 , 106.Xr rmdir 2 , 107.Xr symlink 7 108.Sh HISTORY 109The 110.Fn unlink 111function appeared in 112.At v6 . 113.Pp 114The 115.Fn unlink 116system call traditionally allows the super-user to unlink directories which 117can damage the file system integrity. This implementation no longer permits 118it. | 105points outside the process's allocated address space. 106.El 107.Sh SEE ALSO 108.Xr close 2 , 109.Xr link 2 , 110.Xr rmdir 2 , 111.Xr symlink 7 112.Sh HISTORY 113The 114.Fn unlink 115function appeared in 116.At v6 . 117.Pp 118The 119.Fn unlink 120system call traditionally allows the super-user to unlink directories which 121can damage the file system integrity. This implementation no longer permits 122it. |