OSDN Git Service

a266f13bef2cdff7dbae74828d591e031db955aa
[linuxjm/LDP_man-pages.git] / draft / man3 / remove.3
1 .\" This file is derived from unlink.2, which has the following copyright:
2 .\"
3 .\" --snip--
4 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
5 .\"                               1993 Ian Jackson.
6 .\"
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" --snip--
27 .\"
28 .\" Edited into remove.3 shape by:
29 .\" Graeme W. Wilford (G.Wilford@ee.surrey.ac.uk) on 13th July 1994
30 .\"
31 .\" Japanese Version Copyright (c) 1998 Ueyama Rui
32 .\"         all rights reserved.
33 .\" Translated Wed Feb 20 15:01:46 JST 1998
34 .\"         by Ueyama Rui <rui@linux.or.jp>
35 .\" Updated Sat Dec 11 JST 1999 by Kentaro Shirakata <argrath@ub32.org>
36 .\" Updated Mon Feb 17 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
37 .\"
38 .TH REMOVE 3 2008-12-03 "GNU" "Linux Programmer's Manual"
39 .\"O .SH NAME
40 .SH 名前
41 .\"O remove \- remove a file or directory
42 remove \- ファイルやディレクトリを削除する
43 .\"O .SH SYNOPSIS
44 .SH 書式
45 .B #include <stdio.h>
46 .sp
47 .BI "int remove(const char *" pathname );
48 .\"O .SH DESCRIPTION
49 .SH 説明
50 .\"O .BR remove ()
51 .\"O deletes a name from the filesystem.
52 .\"O It calls
53 .\"O .BR unlink (2)
54 .\"O for files, and
55 .\"O .BR rmdir (2)
56 .\"O for directories.
57 .BR remove ()
58 はファイルシステムからファイル名を削除する。
59 ファイルに対しては
60 .BR unlink (2)
61 を、ディレクトリに対しては
62 .BR rmdir (2)
63 を呼び出す。
64
65 .\"O If the removed name was the
66 .\"O last link to a file and no processes have the file open, the file is
67 .\"O deleted and the space it was using is made available for reuse.
68 もしその名前が
69 ファイルへの最後のリンクで、かつ、どのプロセスもそのファイルを
70 開いていないなら、ファイルも削除する。ファイルの占めていた
71 領域は他で使うことができるようになる。
72
73 .\"O If the name was the last link to a file,
74 .\"O but any processes still have the file open,
75 .\"O the file will remain in existence until the last file
76 .\"O descriptor referring to it is closed.
77 名前がファイルへの最後のリンクであっても、どこかのプロセスが
78 そのファイルを開いているなら、ファイルの最後のファイル記述子
79 (file descriptor) が閉じられるまでファイルは存在し続ける。
80
81 .\"O If the name referred to a symbolic link, the link is removed.
82 名前が指しているのがシンボリックリンクなら、そのリンクを削除する。
83
84 .\"O If the name referred to a socket, FIFO, or device, the name is removed,
85 .\"O but processes which have the object open may continue to use it.
86 名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、
87 そのソケットなどを開いているプロセスはそのまま使い続けることができる。
88 .\"O .SH "RETURN VALUE"
89 .SH 返り値
90 .\"O On success, zero is returned.
91 .\"O On error, \-1 is returned, and
92 .\"O .I errno
93 .\"O is set appropriately.
94 成功すれば 0 が返る。エラーなら \-1 が返り、
95 .I errno
96 に適切な値がセットされる。
97 .\"O .SH ERRORS
98 .SH エラー
99 .\"O The errors that occur are those for
100 .\"O .BR unlink (2)
101 .\"O and
102 .\"O .BR rmdir (2).
103 発生するエラーは
104 .BR unlink (2)
105 および
106 .BR rmdir (2)
107 と同じものである。
108 .\"O .SH "CONFORMING TO"
109 .SH 準拠
110 C89, C99, 4.3BSD, POSIX.1-2001.
111 .\"O .SH NOTES
112 .SH 注意
113 .\"O Under libc4 and libc5,
114 .\"O .BR remove ()
115 .\"O was an alias for
116 .\"O .BR unlink (2)
117 .\"O (and hence would not remove directories).
118 libc4 と libc5 においては、
119 .BR remove ()
120
121 .BR unlink (2)
122 の別名であった (従ってディレクトリを削除できなかった)。
123 .\"O .SH BUGS
124 .SH バグ
125 .\"O In-felicities in the protocol underlying NFS can cause the unexpected
126 .\"O disappearance of files which are still being used.
127 NFS プロトコルの根本的な不都合により、使用中のファイルが、
128 想定できない形で削除されることがありえる。
129 .\"O .SH "SEE ALSO"
130 .SH 関連項目
131 .BR rm (1),
132 .BR unlink (1),
133 .BR link (2),
134 .BR mknod (2),
135 .BR open (2),
136 .BR rename (2),
137 .BR rmdir (2),
138 .BR unlink (2),
139 .BR mkfifo (3),
140 .BR symlink (7)