Submitted by: Akira Ikeuchi <a_ikeuchi@mic.mitsumi.co.jp> Reviewed by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
113 lines
4.1 KiB
Groff
113 lines
4.1 KiB
Groff
.\" Copyright (c) 1980, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93
|
|
.\" %FreeBSD: src/lib/libc/sys/unlink.2,v 1.17 2004/07/02 23:52:13 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd June 4, 1993
|
|
.Dt UNLINK 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm unlink
|
|
.Nd ¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê¤Îºï½ü
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In unistd.h
|
|
.Ft int
|
|
.Fn unlink "const char *path"
|
|
.Sh ²òÀâ
|
|
.Fn unlink
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢
|
|
.Fa path
|
|
¤Ç»ØÄꤵ¤ì¤¿¥ê¥ó¥¯¤ò¥Ç¥£¥ì¥¯¥È¥ê¤«¤éºï½ü¤·¡¢
|
|
¤½¤Î¥ê¥ó¥¯¤Ç»²¾È¤µ¤ì¤Æ¤¤¤¿¥Õ¥¡¥¤¥ë¤Î¥ê¥ó¥¯¿ô¤ò¸º¤é¤·¤Þ¤¹¡£
|
|
¥Õ¥¡¥¤¥ë¤Î¥ê¥ó¥¯¿ô¤¬ 0 ¤Ë¤Ê¤ê¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤¤¤ë¥×¥í¥»¥¹¤¬¤Ê¤¯¤Ê¤ë¤È¡¢
|
|
¥Õ¥¡¥¤¥ë¤Ë´ØÏ¢¤¹¤ë¤¹¤Ù¤Æ¤Î¥ê¥½¡¼¥¹¤¬ºÆÍøÍѤµ¤ì¤Þ¤¹¡£
|
|
ºÇ¸å¤Î¥ê¥ó¥¯¤¬ºï½ü¤µ¤ì¤¿¤È¤¤Ë¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤¤¤ë¥×¥í¥»¥¹¤¬
|
|
1 ¤Ä°Ê¾å¤¢¤ë¤È¡¢¥ê¥ó¥¯¤Ïºï½ü¤µ¤ì¤Þ¤¹¤¬¡¢¥Õ¥¡¥¤¥ë¤Îºï½ü¤Ï¡¢
|
|
¤½¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î¤¹¤Ù¤Æ¤Î»²¾È¤¬ÊĤ¸¤é¤ì¤ë¤Þ¤Ç±ä´ü¤µ¤ì¤Þ¤¹¡£
|
|
.Fa path
|
|
°ú¿ô¤Ï¡¢¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
|
|
.Sh Ìá¤êÃÍ
|
|
.Rv -std unlink
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn unlink
|
|
¤Ï¡¢°Ê²¼¤Î¾ì¹ç¤Ë½èÍý¤ò¼ºÇÔ¤·¤Þ¤¹¡£
|
|
.Bl -tag -width Er
|
|
.It Bq Er ENOTDIR
|
|
¥Ñ¥¹¤Î¹½À®Í×ÁÇÃæ¤Ë¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¤â¤Î¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENAMETOOLONG
|
|
¥Ñ¥¹Ì¾¤Î¹½À®Í×ÁǤ¬ 255 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤ë¤«¡¢
|
|
¤Þ¤¿¤Ï¥Ñ¥¹Ì¾Á´ÂΤ¬ 1023 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENOENT
|
|
»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤»¤ó¡£
|
|
.It Bq Er EACCES
|
|
Á°Ã֥ѥ¹Ì¾¤Î¹½À®Í×ÁǤˤĤ¤¤Æ¸¡º÷µö²Ä¤¬µñÈݤµ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er EACCES
|
|
ºï½ü¤¹¤ë¥ê¥ó¥¯¤ò´Þ¤à¥Ç¥£¥ì¥¯¥È¥ê¤Ç¡¢½ñ¹þ¤ßµö²Ä¤¬µñÈݤµ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ELOOP
|
|
¥Ñ¥¹Ì¾¤òÊÑ´¹¤¹¤ë¤È¤¤Ë¸¡½Ð¤µ¤ì¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬Â¿¤¹¤®¤Þ¤¹¡£
|
|
.It Bq Er EPERM
|
|
»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er EPERM
|
|
¥Õ¥¡¥¤¥ë¤ò´Þ¤à¥Ç¥£¥ì¥¯¥È¥ê¤¬¥¹¥Æ¥£¥Ã¥¤È¥Þ¡¼¥¯¤µ¤ì¡¢
|
|
ºï½ü¤¹¤ë¥Õ¥¡¥¤¥ë¤ò´Þ¤à¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë¤¬¡¢
|
|
͸ú¤Ê¥æ¡¼¥¶ ID ¤Ë½êͤµ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
|
|
.It Bq Er EBUSY
|
|
¥ê¥ó¥¯¤òºï½ü¤¹¤ë¥¨¥ó¥È¥ê¤¬¡¢
|
|
¥Þ¥¦¥ó¥ÈºÑ¤ß¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ç¤¹¡£
|
|
.It Bq Er EIO
|
|
¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê¤Îºï½üÃæ¤«¡¢inode ¤Î³ä¤êÅö¤Æ²ò½üÃæ¤Ë
|
|
Æþ½ÐÎÏ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
|
|
.It Bq Er EROFS
|
|
»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ÏÆÉ¼è¤êÀìÍÑ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Ë¤¢¤ê¤Þ¤¹¡£
|
|
.It Bq Er EFAULT
|
|
.Fa path
|
|
°ú¿ô¤¬¡¢¥×¥í¥»¥¹¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥¢¥É¥ì¥¹¶õ´Ö¤ÎÈϰϳ°¤ò»Ø¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr close 2 ,
|
|
.Xr link 2 ,
|
|
.Xr rmdir 2 ,
|
|
.Xr symlink 7
|
|
.Sh Îò»Ë
|
|
.Fn unlink
|
|
´Ø¿ô¤Ï¡¢
|
|
.At v6
|
|
¤ÇÅо줷¤Þ¤·¤¿¡£
|
|
.Pp
|
|
½¾Íè¤Î
|
|
.Fn unlink
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤Ï¡¢¥¹¡¼¥Ñ¥æ¡¼¥¶¤¬¥Ç¥£¥ì¥¯¥È¥ê¤òºï½ü¤Ç¤¤Æ¤·¤Þ¤¤¡¢
|
|
¤³¤ì¤Ë¤è¤Ã¤Æ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î´°Á´À¤¬Ç˲õ¤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤·¤¿¡£
|
|
¤½¤ì¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ï¡¢¤¹¤Ç¤Ëµö²Ä¤µ¤ì¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
|