Submitted by: Akira Ikeuchi <a_ikeuchi@mic.mitsumi.co.jp> Reviewed by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
155 lines
5.1 KiB
Groff
155 lines
5.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.
|
|
.\"
|
|
.\" @(#)link.2 8.3 (Berkeley) 1/12/94
|
|
.\" %FreeBSD: src/lib/libc/sys/link.2,v 1.25 2004/07/02 23:52:13 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd March 5, 1999
|
|
.Dt LINK 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm link
|
|
.Nd ¥Ï¡¼¥É¥Õ¥¡¥¤¥ë¥ê¥ó¥¯¤òºîÀ®¤¹¤ë
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In unistd.h
|
|
.Ft int
|
|
.Fn link "const char *name1" "const char *name2"
|
|
.Sh ²òÀâ
|
|
.Fn link
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢
|
|
.Fa name1
|
|
¤¬»Ø¤¹²¼ÁØ¥ª¥Ö¥¸¥§¥¯¥È¤Î°À¤ò»ý¤Ä¡¢»ØÄê¤Î¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê (¥Ï¡¼¥É¥ê¥ó¥¯)
|
|
.Fa name2
|
|
¤òÉÔ²Äʬ¤ËºîÀ®¤·¤Þ¤¹¡£
|
|
¥ê¥ó¥¯¤¬Àµ¾ï¤Ë´°Î»¤¹¤ë¤È²¼ÁØ¥ª¥Ö¥¸¥§¥¯¥È¤Î¥ê¥ó¥¯¥«¥¦¥ó¥È¤¬Áý²Ã¤·¤Þ¤¹¡£
|
|
.Fa name1
|
|
¤È
|
|
.Fa name2
|
|
¤Ï¡¢²¼ÁØ¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥¢¥¯¥»¥¹¤È¥¢¥¯¥»¥¹¸¢¤òÅù¤·¤¯¶¦Í¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Fa name1
|
|
¤òºï½ü¤·¤Æ¤â¥Õ¥¡¥¤¥ë
|
|
.Fa name2
|
|
¤Ïºï½ü¤µ¤ì¤º¡¢²¼ÁØ¥ª¥Ö¥¸¥§¥¯¥È¤Î¥ê¥ó¥¯¥«¥¦¥ó¥È¤¬¸º¾¯¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Fa name1
|
|
°ú¿ô¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ë¥ª¥Ö¥¸¥§¥¯¥È
|
|
¤Ï¥Ï¡¼¥É¥ê¥ó¥¯¤¬À®¸ù¤¹¤ë¤¿¤á¤Ë¸ºß¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¡¢
|
|
.Fa name1
|
|
¤È
|
|
.Fa name2
|
|
¤ÎξÊý¤¬Æ±¤¸¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Ë¸ºß¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
|
.Fa name1
|
|
°ú¿ô¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
|
|
.Sh Ìá¤êÃÍ
|
|
.Rv -std link
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn link
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¼¡¤Î¾ì¹ç¤Ë½èÍý¤Ë¼ºÇÔ¤·¡¢¥ê¥ó¥¯¤ÏºîÀ®¤µ¤ì¤Þ¤»¤ó:
|
|
.Bl -tag -width Er
|
|
.It Bq Er ENOTDIR
|
|
¤¤¤º¤ì¤«¤ÎÁ°Ã֥ѥ¹Ì¾¤Î¹½À®Í×ÁǤ¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
.It Bq Er ENAMETOOLONG
|
|
¤¤¤º¤ì¤«¤Î¥Ñ¥¹Ì¾¤Î¹½À®Í×ÁǤ¬ 255 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤ë¤«¡¢
|
|
¤Þ¤¿¤Ï¤¤¤º¤ì¤«¤Î¥Ñ¥¹Ì¾Á´ÂΤÎŤµ¤¬ 1023 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENOENT
|
|
¤¤¤º¤ì¤«¤ÎÁ°Ã֥ѥ¹Ì¾¤Î¹½À®Í×ÁǤ¬Â¸ºß¤·¤Þ¤»¤ó¡£
|
|
.It Bq Er EOPNOTSUPP
|
|
.Fa name1
|
|
¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬Æþ¤Ã¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬
|
|
¥ê¥ó¥¯¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¡£
|
|
.It Bq Er EMLINK
|
|
.Fa name1
|
|
¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¥ê¥ó¥¯¥«¥¦¥ó¥È¤¬ 32767 ¤ò±Û¤¨¤Þ¤¹¡£
|
|
.It Bq Er EACCES
|
|
¤¤¤º¤ì¤«¤ÎÁ°Ã֥ѥ¹Ì¾¤Î¹½À®Í×ÁǤˤĤ¤¤Æ¸¡º÷µö²Ä¤¬µñÈݤµ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er EACCES
|
|
Í׵ᤵ¤ì¤¿¥ê¥ó¥¯¤Ï¡¢½ñ¹þ¤ßµö²Ä¤òµñÈݤ¹¤ë¥â¡¼¥É¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë
|
|
½ñ¤¹þ¤à¤³¤È¤òÍ׵ᤷ¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ELOOP
|
|
¥Ñ¥¹Ì¾¤òÊÑ´¹¤¹¤ë¤È¤¤Ë¸¡½Ð¤µ¤ì¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬Â¿¤¹¤®¤Þ¤¹¡£
|
|
.It Bq Er ENOENT
|
|
.Fa name1
|
|
¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤»¤ó¡£
|
|
.It Bq Er EEXIST
|
|
.Fa name2
|
|
¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥ê¥ó¥¯¤¬Â¸ºß¤·¤Þ¤¹¡£
|
|
.It Bq Er EPERM
|
|
.Fa name1
|
|
¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¢¤ë¤«¡¢
|
|
Êѹ¹¶Ø»ß¤â¤·¤¯¤ÏÄɲäΤ߲Äǽ¤Ç¤¢¤ë¤È¥Õ¥é¥°¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤Þ¤¹ (
|
|
.Xr chflags 2
|
|
»²¾È)¡£
|
|
.It Bq Er EXDEV
|
|
.Fa name2
|
|
¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥ê¥ó¥¯¤È
|
|
.Fa name1
|
|
¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬°Û¤Ê¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Ë¤¢¤ê¤Þ¤¹¡£
|
|
.It Bq Er ENOSPC
|
|
¥Ç¥£¥ì¥¯¥È¥ê¤ò³ÊǼ¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÍÆÎ̤¬»Ä¤Ã¤Æ¤¤¤Ê¤¤¤¿¤á¡¢
|
|
¿·¤·¤¤¥ê¥ó¥¯¤òÆþ¤ì¤ë¥¨¥ó¥È¥ê¤òÃÖ¤¯¥Ç¥£¥ì¥¯¥È¥ê¤ò³ÈÄ¥¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Bq Er EDQUOT
|
|
¥Ç¥£¥ì¥¯¥È¥ê¤ò³ÊǼ¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¥æ¡¼¥¶¤Î¥Ç¥£¥¹¥¯¥Ö¥í¥Ã¥¯¤Ë
|
|
´Ø¤¹¤ë¥¯¥©¡¼¥¿¤¬¸Ï³é¤·¤¿¤¿¤á¡¢
|
|
¿·¤·¤¤¥ê¥ó¥¯¤òÆþ¤ì¤ë¥¨¥ó¥È¥ê¤òÃÖ¤¯¥Ç¥£¥ì¥¯¥È¥ê¤ò³ÈÄ¥¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Bq Er EIO
|
|
¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê¤òºîÀ®¤¹¤ë¤¿¤á¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë
|
|
ÆÉ¤ß½ñ¤¤·¤Æ¤¤¤ë´Ö¤ËÆþ½ÐÎÏ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
|
|
.It Bq Er EROFS
|
|
Í׵ᤵ¤ì¤¿¥ê¥ó¥¯¤Ï¡¢ÆÉ¼è¤êÀìÍÑ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë
|
|
½ñ¹þ¤ß¤¹¤ë¤³¤È¤òÍ׵ᤷ¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er EFAULT
|
|
»ØÄꤵ¤ì¤¿¥Ñ¥¹Ì¾¤Î 1 ¤Ä¤¬¡¢¥×¥í¥»¥¹¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿
|
|
¥¢¥É¥ì¥¹¶õ´Ö¤ÎÈϰϳ°¤ò»Ø¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr readlink 2 ,
|
|
.Xr symlink 2 ,
|
|
.Xr unlink 2
|
|
.Sh µ¬³Ê
|
|
.Fn link
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
|
|
.St -p1003.1-90
|
|
¤ËŬ¹ç¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.Sh Îò»Ë
|
|
.Fn link
|
|
´Ø¿ô¤Ï
|
|
.At v7
|
|
¤ÇÅо줷¤Þ¤·¤¿¡£
|
|
.Pp
|
|
½¾Íè¡¢¥¹¡¼¥Ñ¥æ¡¼¥¶¤Ï
|
|
.Fn link
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ë¤è¤Ã¤Æ¥Ç¥£¥ì¥¯¥È¥ê¤ò¥ê¥ó¥¯¤Ç¤¡¢
|
|
¤³¤ì¤Ï¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î°ì´ÓÀ¤òÇ˲õ¤¹¤ë¤â¤Î¤Ç¤·¤¿¡£
|
|
¤³¤Î¼ÂÁõ¤Ç¤Ï¡¢¤³¤Î¤è¤¦¤ÊÁàºî¤Ï¤â¤Ï¤äµö¤µ¤ì¤Þ¤»¤ó¡£
|