-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
-.\" 1993 Michael Haardt, Ian Jackson.
+.\" and Copyright (C) 1993 Michael Haardt, Ian Jackson.
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" Modified 1993-07-24 by Rik Faith
.\" Modified 1996-04-26 by Nick Duffek <nsd@bbc.com>
.\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
-.\" all rights reserved.
-.\" Translated Fri Dec 12 00:32:12 JST 1997
-.\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated & Modifed Sat Feb 12 11:20:18 JST 2005
-.\" by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"*******************************************************************
.\"
-.\"WORD: symbolic link ¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯
-.\"WORD: directory ¥Ç¥£¥ì¥¯¥È¥ê
-.\"WORD: soft link ¥½¥Õ¥È¡¦¥ê¥ó¥¯
-.\"WORD: hard link ¥Ï¡¼¥É¡¦¥ê¥ó¥¯
-.\"WORD: dangling link ²õ¤ì¤¿¥ê¥ó¥¯
-.\"WORD: sticky bit ¥¹¥Æ¥£¥Ã¥¡¼¡¦¥Ó¥Ã¥È
-.\"WORD: ownership ½ê͸¢
-.\"WORD: file system ¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à
-.\"WORD: effective uid ¼Â¸ú¥æ¡¼¥¶¡¼ID
-.\"WORD: kernel ¥«¡¼¥Í¥ë
-.\"WORD: entry ¥¨¥ó¥È¥ê
+.\" This file was generated with po4a. Translate the source file.
.\"
-.TH SYMLINK 2 2007-07-26 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH ̾Á°
-.\"O symlink \- make a new name for a file
-symlink \- ¥Õ¥¡¥¤¥ë¤Ë¿·¤·¤¤Ì¾Á°¤òÉÕ¤±¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B #include <unistd.h>
+.\"*******************************************************************
+.TH SYMLINK 2 2013\-01\-27 Linux "Linux Programmer's Manual"
+.SH 名前
+symlink \- ファイルに新しい名前を付ける
+.SH 書式
+\fB#include <unistd.h>\fP
.sp
-.BI "int symlink(const char *" oldpath ", const char *" newpath );
+\fBint symlink(const char *\fP\fIoldpath\fP\fB, const char *\fP\fInewpath\fP\fB);\fP
.sp
.in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
.in
.sp
.ad l
-.BR symlink ():
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _POSIX_C_SOURCE\ >=\ 200112L
+\fBsymlink\fP():
+.RS 4
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
.ad b
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O .BR symlink ()
-.\"O creates a symbolic link named
-.\"O .I newpath
-.\"O which contains the string
-.\"O .IR oldpath .
-.BR symlink ()
-¤Ï
-.I oldpath
-¤È¤¤¤¦Ê¸»úÎó¤ò¥Õ¥¡¥¤¥ë¤ÎÆâÍƤȤ·¤Æ»ý¤Ä
-.I newpath
-¤È¤¤¤¦¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯ (symbolic link) ¤òºîÀ®¤¹¤ë¡£
+.SH 説明
+\fBsymlink\fP() は \fIoldpath\fP という文字列をファイルの内容として持つ \fInewpath\fP というシンボリックリンク
+(symbolic link) を作成する。
-.\"O Symbolic links are interpreted at run time as if the contents of the
-.\"O link had been substituted into the path being followed to find a file or
-.\"O directory.
-¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Ï¼Â¹Ô»þ¤Ë²ò¼á¤µ¤ì¡¢
-¥ê¥ó¥¯¤ÎÆâÍƤǥѥ¹¤òÃÖ¤´¹¤¨¤Æ¡¢¤½¤Î¥Ñ¥¹¤òé¤ë¤³¤È¤Ç¡¢
-¥Õ¥¡¥¤¥ë¤ä¥Ç¥£¥ì¥¯¥È¥ê¤ËÅþ㤹¤ë¡£
+シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパスを辿ることで、 ファイルやディレクトリに到達する。
-.\"O Symbolic links may contain
-.\"O .I ..
-.\"O path components, which (if used at the start of the link) refer to the
-.\"O parent directories of that in which the link resides.
-¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Ï¥Ñ¥¹¤ÎÉôʬ¤Ë
-.I ..
-¤ò´Þ¤à¤«¤â¤·¤ì¤Ê¤¤¡£¤³¤ì¤Ï (¤â¤·¥ê¥ó¥¯¤ÎºÇ½é¤Ë»ÈÍѤµ¤ì¤¿¾ì¹ç¤Ï) ¥ê¥ó¥¯¤Î
-¸ºß¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¿Æ¥Ç¥£¥ì¥¯¥È¥ê¤¬»²¾È¤µ¤ì¤ë¡£
+シンボリックリンクはパスの部分に \fI..\fP を含むかもしれない。これは (もしリンクの最初に使用された場合は) リンクの
+存在するディレクトリの親ディレクトリが参照される。
-.\"O A symbolic link (also known as a soft link) may point to an existing
-.\"O file or to a nonexistent one; the latter case is known as a dangling
-.\"O link.
-¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Ï (¥½¥Õ¥È¡¦¥ê¥ó¥¯ (soft link) ¤È¤â¸Æ¤Ð¤ì)
-¸ºß¤¹¤ë¥Õ¥¡¥¤¥ë¤ò»Ø¤·¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤¤·¡¢
-¸ºß¤·¤Ê¤¤¥Õ¥¡¥¤¥ë¤ò»Ø¤·¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤;
-¸å¼Ô¤Î¾ì¹ç¤Ï²õ¤ì¤¿¥ê¥ó¥¯ (dangling link) ¤È¤â¸Æ¤Ð¤ì¤ë¡£
+シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ) 存在するファイルを指しているかもしれないし、
+存在しないファイルを指しているかもしれない; 後者の場合は壊れたリンク (dangling link) とも呼ばれる。
-.\"O The permissions of a symbolic link are irrelevant; the ownership is
-.\"O ignored when following the link, but is checked when removal or
-.\"O renaming of the link is requested and the link is in a directory with
-.\"O the sticky bit
-.\"O .RB ( S_ISVTX )
-.\"O set.
-¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Îµö²Ä (permission) ¤Ï̵°ÕÌ£¤Ç¤¢¤ë;
-¥ê¥ó¥¯¤òÄÉÀפ¹¤ë¾ì¹ç¤Ë¤Ï½ê͸¢ (ownership) ¤Ï̵»ë¤µ¤ì¤ë¡£
-¤¿¤À¤·¡¢¥ê¥ó¥¯¤Îºï½ü¤ä̾Á°¤ÎÊѹ¹¤¬Í׵ᤵ¤ì¡¢¤«¤Ä¥ê¥ó¥¯¤¬Â¸ºß¤¹¤ë
-¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥¹¥Æ¥£¥Ã¥¡¼¡¦¥Ó¥Ã¥È (sticky bit)
-.RB ( S_ISVTX )
-¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢½ê͸¢¤Î¥Á¥§¥Ã¥¯¤¬¹Ô¤ï¤ì¤ë¡£
+シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合には所有権 (ownership) は無視される。
+ただし、リンクの削除や名前の変更が要求され、かつリンクが存在する ディレクトリにスティッキービット (sticky bit) (\fBS_ISVTX\fP)
+が設定されている場合には、所有権のチェックが行われる。
-.\"O If
-.\"O .I newpath
-.\"O exists it will
-.\"O .I not
-.\"O be overwritten.
-.I newpath
-¤¬´û¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ë¤Ï¾å½ñ¤¤Ï\fB¤µ¤ì¤Ê¤¤\fR¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O On success, zero is returned.
-.\"O On error, \-1 is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-À®¸ù¤·¤¿¾ì¹ç¤Ë¤Ï 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EACCES
-.\"O Write access to the directory containing
-.\"O .I newpath
-.\"O is denied, or one of the directories in the path prefix of
-.\"O .I newpath
-.\"O did not allow search permission.
-.\"O (See also
-.\"O .BR path_resolution (7).)
-.I newpath
-¤ò´Þ¤ó¤Ç¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ø¤Î½ñ¤¹þ¤ß¤¬µñÈݤµ¤ì¤¿¤«¡¢
-.I newpath
-¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¤É¤ì¤«¤Ë¸¡º÷µö²Ä¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤
-.RB ( path_resolution (7)
-¤â»²¾È¤¹¤ë¤³¤È)¡£
-.TP
-.B EEXIST
-.\"O .I newpath
-.\"O already exists.
-.I newpath
-¤¬´û¤Ë¸ºß¤·¤Æ¤¤¤ë¡£
-.TP
-.B EFAULT
-.\"O .IR oldpath " or " newpath " points outside your accessible address space."
-.IR oldpath " ¤ä " newpath " ¤¬¥¢¥¯¥»¥¹²Äǽ¤Ê¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£"
-.TP
-.B EIO
-.\"O An I/O error occurred.
-I/O ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¡£
-.TP
-.B ELOOP
-.\"O Too many symbolic links were encountered in resolving
-.\"O .IR newpath .
-.I newpath
-¤ò²ò·è¤¹¤ëºÝ¤ËÁø¶ø¤·¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤¬Â¿²á¤®¤ë¡£
-.TP
-.B ENAMETOOLONG
-.\"O .IR oldpath " or " newpath " was too long."
-.IR oldpath " ¤Þ¤¿¤Ï " newpath " ¤¬Ä¹²á¤®¤ë¡£"
-.TP
-.B ENOENT
-.\"O A directory component in
-.\"O .I newpath
-.\"O does not exist or is a dangling symbolic link, or
-.\"O .I oldpath
-.\"O is the empty string.
-.I newpath
-¤Ë´Þ¤Þ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤¬Â¸ºß¤·¤Ê¤¤¤«¡¢²õ¤ì¤¿¥ê¥ó¥¯¤Ç¤¢¤ë¤«¡¢
-.I oldpath
-¤¬¶õʸ»úÎó¤Ç¤¢¤ë¡£
-.TP
-.B ENOMEM
-.\"O Insufficient kernel memory was available.
-½½Ê¬¤Ê¥«¡¼¥Í¥ë (kernel) ¤Î¥á¥â¥ê¡¼¤¬¤Ê¤¤¡£
-.TP
-.B ENOSPC
-.\"O The device containing the file has no room for the new directory
-.\"O entry.
-¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¥Ç¥Ð¥¤¥¹¤Ë¿·¤·¤¤¥Ç¥£¥ì¥¯¥È¥ê¡¦¥¨¥ó¥È¥ê
-(directory entry) ¤òºîÀ®¤¹¤ë¤À¤±¤Î½½Ê¬¤ÊÍÆÎ̤¬¤Ê¤¤¡£
-.TP
-.B ENOTDIR
-.\"O A component used as a directory in
-.\"O .I newpath
-.\"O is not, in fact, a directory.
-.I newpath
-¤Ë´Þ¤Þ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤¬¡¢¼ÂºÝ¤Ë¤Ï¡¢¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤Ê¤¤¡£
-.TP
-.B EPERM
-.\"O The file system containing
-.\"O .I newpath
-.\"O does not support the creation of symbolic links.
-.I newpath
-¤ò´Þ¤ó¤Ç¤¤¤ë¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à (file system) ¤¬
-¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤ÎºîÀ®¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B EROFS
-.\"O .I newpath
-.\"O is on a read-only file system.
-.I newpath
-¤¬Æɤ߹þ¤ßÀìÍѤΥե¡¥¤¥ë¡¦¥·¥¹¥Æ¥à¤Ë¸ºß¤·¤Æ¤¤¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-SVr4, 4.3BSD, POSIX.1-2001.
-.\"O .\" SVr4 documents additional error codes EDQUOT and ENOSYS.
-.\" SVr4 ¤Ë¤Ï¾¤Ë EDQUOT, ENOSYS ¥¨¥é¡¼¤Ë¤Ä¤¤¤Æ¤Îµ½Ò¤¬¤¢¤ë¡£
-.\"O .\" See
-.\"O .\" .BR open (2)
-.\"O .\" re multiple files with the same name, and NFS.
+\fInewpath\fP が存在する場合には上書きは\fIされない\fP。
+.SH 返り値
+成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP
+\fBEACCES\fP
+\fInewpath\fP を含んでいるディレクトリへの書き込みが拒否されたか、 \fInewpath\fP
+に含まれているディレクトリのどれかに検索許可が与えられていない (\fBpath_resolution\fP(7) も参照すること)。
+.TP
+\fBEDQUOT\fP
+そのファイルシステムのリソース使用量がユーザクォータに達している。対象となるリソースは inode
+かディスクブロックで、どちらになるかはファイルシステムの実装依存である。
+.TP
+\fBEEXIST\fP
+\fInewpath\fP が既に存在する。
+.TP
+\fBEFAULT\fP
+\fIoldpath\fP や \fInewpath\fP がアクセス可能なアドレス空間の外を指している。
+.TP
+\fBEIO\fP
+I/O エラーが発生した。
+.TP
+\fBELOOP\fP
+\fInewpath\fP を解決する際に遭遇したシンボリックリンクが多過ぎる。
+.TP
+\fBENAMETOOLONG\fP
+\fIoldpath\fP または \fInewpath\fP が長過ぎる。
+.TP
+\fBENOENT\fP
+\fInewpath\fP に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 \fIoldpath\fP が空文字列である。
+.TP
+\fBENOMEM\fP
+十分なカーネルメモリーがない。
+.TP
+\fBENOSPC\fP
+そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための空きがない。
+.TP
+\fBENOTDIR\fP
+\fInewpath\fP に含まれるディレクトリ部分が、実際には、ディレクトリではない。
+.TP
+\fBEPERM\fP
+\fInewpath\fP を含んでいるファイルシステム (file system) が シンボリックリンクの作成をサポートしていない。
+.TP
+\fBEROFS\fP
+\fInewpath\fP が読み込み専用のファイルシステムに存在している。
+.SH 準拠
+.\" SVr4 documents additional error codes EDQUOT and ENOSYS.
+.\" See
.\" .BR open (2)
-.\" ¤ò¸«¤Æ¡¢Æ±¤¸Ì¾Á°¤Î½ÅÊ£¤È NFS ¤Ë¤Ä¤¤¤Æ»²¾È¤¹¤ë¤³¤È¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O No checking of
-.\"O .I oldpath
-.\"O is done.
-.I oldpath
-¤Ë¤Ä¤¤¤Æ¤Î¥Á¥§¥Ã¥¯¤Ï¹Ô¤Ê¤ï¤ì¤Ê¤¤¡£
+.\" re multiple files with the same name, and NFS.
+SVr4, 4.3BSD, POSIX.1\-2001.
+.SH 注意
+\fIoldpath\fP についてのチェックは行なわれない。
-.\"O Deleting the name referred to by a symlink will actually delete the
-.\"O file (unless it also has other hard links).
-.\"O If this behavior is not desired, use
-.\"O .BR link (2).
-symlink ¤Ë¤è¤Ã¤Æ»²¾È¤µ¤ì¤ë̾Á°¤òºï½ü¤¹¤ë¤È (¤½¤ì¤¬Â¾¤Ë¥Ï¡¼¥É¡¦¥ê¥ó¥¯
-(hard link) ¤ò»ý¤¿¤Ê¤±¤ì¤Ð) ¼ÂºÝ¤Ë¥Õ¥¡¥¤¥ë¤¬ºï½ü¤µ¤ì¤ë¡£
-¤³¤ÎÆ°ºî¤¬Ë¾¤ó¤À¤â¤Î¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢
-.BR link (2)
-¤ò»ÈÍѤ¹¤ë¤³¤È¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR ln (1),
-.BR lchown (2),
-.BR link (2),
-.BR lstat (2),
-.BR open (2),
-.BR readlink (2),
-.BR rename (2),
-.BR symlinkat (2),
-.BR unlink (2),
-.BR path_resolution (7),
-.BR symlink (7)
+symlink によって参照される名前を削除すると (それが他にハードリンク (hard link) を持たなければ) 実際にファイルが削除される。
+この動作が望んだものでない場合は、 \fBlink\fP(2) を使用すること。
+.SH 関連項目
+\fBln\fP(1), \fBlchown\fP(2), \fBlink\fP(2), \fBlstat\fP(2), \fBopen\fP(2), \fBreadlink\fP(2),
+\fBrename\fP(2), \fBsymlinkat\fP(2), \fBunlink\fP(2), \fBpath_resolution\fP(7),
+\fBsymlink\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。