OSDN Git Service

3e0e4b9ef98ec3f6d251f6608de220544ee23f01
[linuxjm/LDP_man-pages.git] / draft / man2 / rmdir.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
4 .\"                               1993 Michael Haardt, 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 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
28 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
29 .\"
30 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
31 .\"         all rights reserved.
32 .\" Translated 1997-12-12, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
33 .\" Updated 2003-10-11, Kentaro Shirakata <argrath@ub32.org>
34 .\" Updated 2005-02-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\" Updated 2006-07-23, Akihiro MOTOKI, LDP v2.36
36 .\" Updated 2008-08-06, Akihiro MOTOKI, LDP v3.05
37 .\"
38 .\"WORD:        directory               ディレクトリ
39 .\"WORD:        file system             ファイル・システム
40 .\"WORD:        sticky bit              スティッキー・ビット
41 .\"WORD:        dangling symbolic link  壊れたシンボリック・リンク
42 .\"WORD:        working directory       ワーキング・ディレクトリ
43 .\"WORD:        root directory          ルート・ディレクトリ
44 .\"WORD:        effective uid           実効ユーザーID
45 .\"WORD:        sticky bit              スティッキー・ビット
46 .\"WORD:        read-only               読み込み専用
47 .\"WORD:        uid                     ユーザーID
48 .\"WORD:        entry                   エントリ
49 .\"WORD:        memory                  メモリ
50 .\"
51 .TH RMDIR 2 2008-05-08 "Linux" "Linux Programmer's Manual"
52 .\"O .SH NAME
53 .SH 名前
54 .\"O rmdir \- delete a directory
55 rmdir \- ディレクトリを削除する
56 .\"O .SH SYNOPSIS
57 .SH 書式
58 .B #include <unistd.h>
59 .sp
60 .BI "int rmdir(const char *" pathname );
61 .\"O .SH DESCRIPTION
62 .SH 説明
63 .\"O .BR rmdir ()
64 .\"O deletes a directory, which must be empty.
65 .BR rmdir ()
66 はディレクトリを削除する。削除するディレクトリは空でなければならない。
67 .\"O .SH "RETURN VALUE"
68 .SH 返り値
69 .\"O On success, zero is returned.
70 .\"O On error, \-1 is returned, and
71 .\"O .I errno
72 .\"O is set appropriately.
73 成功した場合はゼロが返される。エラーの場合は \-1 が返され、
74 .I errno
75 が適切に設定される。
76 .\"O .SH ERRORS
77 .SH エラー
78 .TP
79 .B EACCES
80 .\"O Write access to the directory containing
81 .\"O .I pathname
82 .\"O was not allowed, or one of the directories in the path prefix of
83 .\"O .I pathname
84 .\"O did not allow search permission.
85 .\"O (See also
86 .\"O .BR path_resolution (7).
87 .I pathname
88 を含んでいるディレクトリへの書き込みアクセスが
89 プロセスの実効 (effective) UID に対して許可されていないか、
90 .I pathname
91 に含まれているディレクトリのどれかに検索 (実行) 許可がないか、
92 .I pathname
93 に至るまでのディレクトリのいずれかに対する検索許可がなかった。
94 .RB ( path_resolution (7)
95 も参照のこと)
96 .TP
97 .B EBUSY
98 .\"O .I pathname
99 .\"O is currently in use by the system or some process that prevents its
100 .\"O removal.
101 .\"O On Linux this means
102 .\"O .I pathname
103 .\"O is currently used as a mount point
104 .\"O or is the root directory of the calling process.
105 .I pathname
106 がシステムや別のプロセスにより使用中で削除することができない。
107 Linux では、
108 .I pathname
109 がマウントポイントとして使用されているか、
110 呼び出したプロセスのルートディレクトリであることを意味する。
111 .TP
112 .B EFAULT
113 .\"O .IR pathname " points outside your accessible address space."
114 .I pathname
115 がアクセス可能なアドレス空間の外を指している。
116 .TP
117 .B EINVAL
118 .\"O .I pathname
119 .\"O has
120 .\"O .I .
121 .\"O as last component.
122 .I pathname
123 の最後のディレクトリ部分が
124 .I .
125 である。
126 .TP
127 .B ELOOP
128 .\"O Too many symbolic links were encountered in resolving
129 .\"O .IR pathname .
130 .I pathname
131 を解決する際に遭遇したシンボリック・リンクが多過ぎる。
132 .TP
133 .B ENAMETOOLONG
134 .\"O .IR pathname " was too long."
135 .I pathname
136 が長過ぎる。
137 .TP
138 .B ENOENT
139 .\"O A directory component in
140 .\"O .I pathname
141 .\"O does not exist or is a dangling symbolic link.
142 .I pathname
143 の中のディレクトリ部分が存在しないか、壊れた (dangling)
144 シンボリック・リンク (symbolic link) である。
145 .TP
146 .B ENOMEM
147 .\"O Insufficient kernel memory was available.
148 十分なカーネルのメモリがない。
149 .TP
150 .B ENOTDIR
151 .\"O .IR pathname ,
152 .\"O or a component used as a directory in
153 .\"O .IR pathname ,
154 .\"O is not, in fact, a directory.
155 .I pathname
156
157 .I pathname
158 に含まれているディレクトリ部分が、実際には、ディレクトリでない。
159 .TP
160 .B ENOTEMPTY
161 .\"O .I pathname
162 .\"O contains entries other than
163 .\"O .IR . " and " .. " ;"
164 .\"O or,
165 .\"O .I pathname
166 .\"O has
167 .\"O .I ..
168 .\"O as its final component.
169 .\"O POSIX.1-2001 also allows
170 .\"O .B EEXIST
171 .\"O for this condition.
172 ディレクトリ
173 .I pathname
174
175 .IR . " と " ..
176 以外のエントリがある。または、
177 .I pathname
178 を構成する最後の要素が
179 .I ..
180 である。
181 POSIX.1-2001 は、この状況で
182 .B EEXIST
183 を返すことを認めている。
184 .TP
185 .B EPERM
186 .\"O The directory containing
187 .\"O .I pathname
188 .\"O has the sticky-bit
189 .\"O .RB ( S_ISVTX )
190 .\"O set and the process's effective user ID is neither the user ID
191 .\"O of the file to be deleted nor that of the directory containing it,
192 .\"O and the process is not privileged (Linux: does not have the
193 .\"O .B CAP_FOWNER
194 .\"O capability).
195 .I pathname
196 を含んでいるディレクトリにスティッキー・ビット(sticky-bit)
197 .RB ( S_ISVTX )
198 が設定されていて、プロセスの実効ユーザーID が削除しようとするファイルの
199 ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも異なり、
200 プロセスも権限 (Linux では
201 .B CAP_FOWNER
202 ケーパビリティ) がない。
203 .TP
204 .B EPERM
205 .\"O The file system containing
206 .\"O .I pathname
207 .\"O does not support the removal of directories.
208 .I pathname
209 を含んでいるファイル・システムがディレクトリの
210 削除をサポートしていない。
211 .TP
212 .B EROFS
213 .\"O .I pathname
214 .\"O refers to a directory on a read-only file system.
215 .I pathname
216 が読み込み専用のファイル・システム上のディレクトリを参照している。
217 .\"O .SH "CONFORMING TO"
218 .SH 準拠
219 SVr4, 4.3BSD, POSIX.1-2001.
220 .\"O .SH BUGS
221 .SH バグ
222 .\"O Infelicities in the protocol underlying NFS can cause the unexpected
223 .\"O disappearance of directories which are still being used.
224 NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが
225 突然消滅する現象が引き起こされることがある。
226 .\"O .SH "SEE ALSO"
227 .SH 関連項目
228 .BR rm (1),
229 .BR rmdir (1),
230 .BR chdir (2),
231 .BR chmod (2),
232 .BR mkdir (2),
233 .BR rename (2),
234 .BR unlink (2),
235 .BR unlinkat (2)