OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man2 / symlink.2
1 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
2 .\"             and Copyright (C) 1993 Michael Haardt, Ian Jackson.
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .\" Modified 1993-07-24 by Rik Faith
27 .\" Modified 1996-04-26 by Nick Duffek <nsd@bbc.com>
28 .\" Modified 1996-11-06 by Eric S. Raymond <esr@thyrsus.com>
29 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
30 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
31 .\"
32 .\"*******************************************************************
33 .\"
34 .\" This file was generated with po4a. Translate the source file.
35 .\"
36 .\"*******************************************************************
37 .TH SYMLINK 2 2013\-01\-27 Linux "Linux Programmer's Manual"
38 .SH 名前
39 symlink \- ファイルに新しい名前を付ける
40 .SH 書式
41 \fB#include <unistd.h>\fP
42 .sp
43 \fBint symlink(const char *\fP\fIoldpath\fP\fB, const char *\fP\fInewpath\fP\fB);\fP
44 .sp
45 .in -4n
46 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
47 .in
48 .sp
49 .ad l
50 \fBsymlink\fP():
51 .RS 4
52 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\ >=\ 200112L
53 .RE
54 .ad b
55 .SH 説明
56 \fBsymlink\fP()  は \fIoldpath\fP という文字列をファイルの内容として持つ \fInewpath\fP というシンボリックリンク
57 (symbolic link) を作成する。
58
59 シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパスを辿ることで、 ファイルやディレクトリに到達する。
60
61 シンボリックリンクはパスの部分に \fI..\fP を含むかもしれない。これは (もしリンクの最初に使用された場合は) リンクの
62 存在するディレクトリの親ディレクトリが参照される。
63
64 シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイルを指しているかもしれないし、
65 存在しないファイルを指しているかもしれない; 後者の場合は壊れたリンク (dangling link) とも呼ばれる。
66
67 シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合には所有権 (ownership) は無視される。
68 ただし、リンクの削除や名前の変更が要求され、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  (\fBS_ISVTX\fP)
69 が設定されている場合には、所有権のチェックが行われる。
70
71 \fInewpath\fP が存在する場合には上書きは\fIされない\fP。
72 .SH 返り値
73 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
74 .SH エラー
75 .TP 
76 \fBEACCES\fP
77 \fInewpath\fP を含んでいるディレクトリへの書き込みが拒否されたか、 \fInewpath\fP
78 に含まれているディレクトリのどれかに検索許可が与えられていない (\fBpath_resolution\fP(7)  も参照すること)。
79 .TP 
80 \fBEDQUOT\fP
81 そのファイルシステムのリソース使用量がユーザクォータに達している。対象となるリソースは inode
82 かディスクブロックで、どちらになるかはファイルシステムの実装依存である。
83 .TP 
84 \fBEEXIST\fP
85 \fInewpath\fP が既に存在する。
86 .TP 
87 \fBEFAULT\fP
88 \fIoldpath\fP や \fInewpath\fP がアクセス可能なアドレス空間の外を指している。
89 .TP 
90 \fBEIO\fP
91 I/O エラーが発生した。
92 .TP 
93 \fBELOOP\fP
94 \fInewpath\fP を解決する際に遭遇したシンボリックリンクが多過ぎる。
95 .TP 
96 \fBENAMETOOLONG\fP
97 \fIoldpath\fP または \fInewpath\fP が長過ぎる。
98 .TP 
99 \fBENOENT\fP
100 \fInewpath\fP に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 \fIoldpath\fP が空文字列である。
101 .TP 
102 \fBENOMEM\fP
103 十分なカーネルメモリーがない。
104 .TP 
105 \fBENOSPC\fP
106 そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための空きがない。
107 .TP 
108 \fBENOTDIR\fP
109 \fInewpath\fP に含まれるディレクトリ部分が、実際には、ディレクトリではない。
110 .TP 
111 \fBEPERM\fP
112 \fInewpath\fP を含んでいるファイルシステム (file system) が シンボリックリンクの作成をサポートしていない。
113 .TP 
114 \fBEROFS\fP
115 \fInewpath\fP が読み込み専用のファイルシステムに存在している。
116 .SH 準拠
117 .\" SVr4 documents additional error codes EDQUOT and ENOSYS.
118 .\" See
119 .\" .BR open (2)
120 .\" re multiple files with the same name, and NFS.
121 SVr4, 4.3BSD, POSIX.1\-2001.
122 .SH 注意
123 \fIoldpath\fP についてのチェックは行なわれない。
124
125 symlink によって参照される名前を削除すると (それが他にハードリンク (hard link) を持たなければ) 実際にファイルが削除される。
126 この動作が望んだものでない場合は、 \fBlink\fP(2)  を使用すること。
127 .SH 関連項目
128 \fBln\fP(1), \fBlchown\fP(2), \fBlink\fP(2), \fBlstat\fP(2), \fBopen\fP(2), \fBreadlink\fP(2),
129 \fBrename\fP(2), \fBsymlinkat\fP(2), \fBunlink\fP(2), \fBpath_resolution\fP(7),
130 \fBsymlink\fP(7)
131 .SH この文書について
132 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
133 である。プロジェクトの説明とバグ報告に関する情報は
134 http://www.kernel.org/doc/man\-pages/ に書かれている。