OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / unlink.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
4 .\"                               1993 Ian Jackson.
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified 1996-09-08 by Arnt Gulbrandsen <agulbra@troll.no>
28 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
29 .\" Modified 2001-05-17 by aeb
30 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
31 .\"
32 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
33 .\"         all rights reserved.
34 .\" Translated Fri Dec 12 00:42:31 JST 1997
35 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
36 .\" Modified Tue Sep  5 02:03:33 JST 2000
37 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
38 .\" Modified Sat Jun  2 08:48:36 JST 2001 by Yuichi SATO
39 .\" Modified Sun Jul  7 02:58:51 JST 2002 by Yuichi SATO
40 .\" Updated & Modified Sun Jan  9 23:28:11 JST 2005
41 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
42 .\"
43 .\"WORD:        file system             ファイルシステム
44 .\"WORD:        link                    リンク
45 .\"WORD:        open                    オープン
46 .\"WORD:        close                   クローズ
47 .\"WORD:        symbolic link           シンボリック・リンク
48 .\"WORD:        descriptor              ディスクリプター
49 .\"WORD:        socket                  ソケット
50 .\"WORD:        device                  デバイス
51 .\"WORD:        effective UID           実効ユーザーID
52 .\"WORD:        sticky-bit              スティッキー・ビット
53 .\"WORD:        dangling symbolic link  壊れたシンボリック・リンク
54 .\"WORD:        memory                  メモリ
55 .\"WORD:        protocol                プロトコル
56 .\"
57 .TH UNLINK 2 2004-06-23 "Linux" "Linux Programmer's Manual"
58 .\"O .SH NAME
59 .SH 名前
60 .\"O unlink \- delete a name and possibly the file it refers to
61 unlink \- 名前を削除し、場合によってはそれが参照しているファイルも削除する
62 .\"O .SH SYNOPSIS
63 .SH 書式
64 .B #include <unistd.h>
65 .sp
66 .BI "int unlink(const char *" pathname );
67 .\"O .SH DESCRIPTION
68 .SH 説明
69 .\"O .BR unlink ()
70 .\"O deletes a name from the file system.
71 .\"O If that name was the
72 .\"O last link to a file and no processes have the file open the file is
73 .\"O deleted and the space it was using is made available for reuse.
74 .BR unlink ()
75 はファイルシステム上の名前を削除する。
76 もしその名前がファイルへの最後のリンク (link) であり、
77 どのプロセスもそのファイルをオープン (open) していなければ、
78 ファイルは削除される。
79 ファイルが使用していたディスク上の領域は再利用が可能になる。
80
81 .\"O If the name was the last link to a file but any processes still have
82 .\"O the file open the file will remain in existence until the last file
83 .\"O descriptor referring to it is closed.
84 もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが
85 そのファイルをまだオープンしている場合は、
86 そのファイルを参照している最後のファイルディスクリプター (file descriptor)
87 がクローズ (close) されるまでファイルは存在し続ける。
88
89 .\"O If the name referred to a symbolic link the link is removed.
90 もしその名前がシンボリック・リンク (symbolic link) を参照していれば、
91 リンクは削除される。
92
93 .\"O If the name referred to a socket, fifo or device the name for it is
94 .\"O removed but processes which have the object open may continue to use
95 .\"O it.
96 もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば
97 名前は削除されるがそのオブジェクトをオープンしていたプロセスは
98 それを使い続けることができる。
99 .\"O .SH "RETURN VALUE"
100 .SH 返り値
101 .\"O On success, zero is returned.
102 .\"O On error, \-1 is returned, and
103 .\"O .I errno
104 .\"O is set appropriately.
105 成功した場合は 0 を返す。エラーならば \-1 を返し、
106 .I errno
107 が適切に設定される。
108 .\"O .SH ERRORS
109 .SH エラー
110 .TP
111 .B EACCES
112 .\"O Write access to the directory containing
113 .\"O .I pathname
114 .\"O is not allowed for the process's effective UID, or one of the
115 .\"O directories in
116 .\"O .I pathname
117 .\"O did not allow search permission.
118 .\"O (See also
119 .\"O .BR path_resolution (7).)
120 .I pathname
121 を含んでいるディレクトリの書き込み許可がプロセスの実効 (effective)
122 ユーザー ID に与えられていないか、
123 .I pathname
124 の中のディレクトリのどれかに検索許可が与えられていない
125 .RB ( path_resolution (7)
126 も参照すること)。
127 .TP
128 .\"O .BR EBUSY " (not on Linux)"
129 .BR EBUSY " (Linux 以外)"
130 .\"O The file
131 .\"O .I pathname
132 .\"O cannot be unlinked because it is being used by the system
133 .\"O or another process and the implementation considers this an error.
134 ファイル
135 .I pathname
136 がシステムまたは他のプロセスによって使用されていて
137 リンクが削除できなかったので、この実装ではエラーとした。
138 .TP
139 .B EFAULT
140 .\"O .I pathname
141 .\"O points outside your accessible address space.
142 .I pathname
143 がアクセス可能なアドレス空間の外を指している。
144 .TP
145 .B EIO
146 .\"O An I/O error occurred.
147 I/O エラーが発生した。
148 .TP
149 .B EISDIR
150 .\"O .I pathname
151 .\"O refers to a directory.
152 .\"O (This is the non-POSIX value returned by Linux since 2.1.132.)
153 .I pathname
154 がディレクトリを参照している。
155 (これは POSIX で規定されていない値で、Linux 2.1.132 以降で返される。)
156 .TP
157 .B ELOOP
158 .\"O Too many symbolic links were encountered in translating
159 .\"O .IR pathname .
160 .I pathname
161 を解決する際に遭遇したシンボリック・リンクが多過ぎる。
162 .TP
163 .B ENAMETOOLONG
164 .\"O .IR pathname " was too long."
165 .IR pathname " が長過ぎる。"
166 .TP
167 .B ENOENT
168 .\"O A component in
169 .\"O .I pathname
170 .\"O does not exist or is a dangling symbolic link, or
171 .\"O .I pathname
172 .\"O is empty.
173 .I pathname
174 に対応するものが存在しないか、壊れたシンボリック・リンクであるか、
175 .I pathname
176 が空である。
177 .TP
178 .B ENOMEM
179 .\"O Insufficient kernel memory was available.
180 十分なカーネル (kernel) のメモリーが使用できない。
181 .TP
182 .B ENOTDIR
183 .\"O A component used as a directory in
184 .\"O .I pathname
185 .\"O is not, in fact, a directory.
186 .I pathname
187 のディレクトリ部分が、実際には、ディレクトリでない。
188 .TP
189 .B EPERM
190 .\"O The system does not allow unlinking of directories,
191 .\"O or unlinking of directories requires privileges that the
192 .\"O calling process doesn't have.
193 .\"O (This is the POSIX prescribed error return;
194 .\"O as noted above, Linux returns
195 .\"O .B EISDIR
196 .\"O for this case.)
197 システムがディレクトリに対する unlink 操作を許可していない。
198 またはディレクトリに対する unlink 操作のために必要な特権を
199 呼び出し元のプロセスが持っていない。
200 (これは POSIX で規定されているエラーの返し方である。
201 上述の通り、この場合には Linux は
202 .B EISDIR
203 を返す。)
204 .TP
205 .\"O .BR EPERM " (Linux only)"
206 .BR EPERM " (Linux のみ)"
207 .\"O The file system does not allow unlinking of files.
208 ファイルシステムがファイルに対する unlink 操作を許していない。
209 .TP
210 .\"O .BR EPERM " or " EACCES
211 .BR EPERM " または " EACCES
212 .\"O The directory containing
213 .\"O .I pathname
214 .\"O has the sticky-bit
215 .\"O .RB ( S_ISVTX )
216 .\"O set and the process's effective UID is neither the UID of the file to
217 .\"O be deleted nor that of the directory containing it, and
218 .\"O the process is not privileged (Linux: does not have the
219 .\"O .B CAP_FOWNER
220 .\"O capability).
221 .I pathname
222 を含んでいるディレクトリにスティッキー・ビット (sticky-bit)
223 .RB ( S_ISVTX )
224 が設定されていて、プロセスの実効ユーザー ID が削除しようとするファイルの
225 UID でもそれを含んでいるディレクトリのものでもなく、
226 かつプロセスに特権がない (Linux では
227 .B CAP_FOWNER
228 ケーパビリティ (capability) がない)。
229 .TP
230 .B EROFS
231 .\"O .I pathname
232 .\"O refers to a file on a read-only file system.
233 .I pathname
234 が読み込み専用のファイルシステムのファイルを参照している。
235 .\"O .SH "CONFORMING TO"
236 .SH 準拠
237 SVr4, 4.3BSD, POSIX.1-2001.
238 .\"O .\" SVr4 documents additional error
239 .\"O .\" conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
240 .\" SVr4 には他に EINTR, EMULTIHOP, ETXTBSY, ENOLINK エラーについての
241 .\" 記述がある。
242 .\"O .SH BUGS
243 .SH バグ
244 .\"O Infelicities in the protocol underlying NFS can cause the unexpected
245 .\"O disappearance of files which are still being used.
246 NFS プロトコル (protocol) の潜在的な不良により、
247 まだ使用中のファイルの突然の消滅を引き起こすことがある。
248 .\"O .SH "SEE ALSO"
249 .SH 関連項目
250 .BR rm (1),
251 .BR chmod (2),
252 .BR link (2),
253 .BR mknod (2),
254 .BR open (2),
255 .BR rename (2),
256 .BR rmdir (2),
257 .BR unlinkat (2),
258 .BR mkfifo (3),
259 .BR remove (3),
260 .BR path_resolution (7),
261 .BR symlink (7)