1 .\" This file is derived from unlink.2, which has the following copyright:
4 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
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.
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.
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
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
28 .\" Edited into remove.3 shape by:
29 .\" Graeme W. Wilford (G.Wilford@ee.surrey.ac.uk) on 13th July 1994
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>
38 .TH REMOVE 3 2008-12-03 "GNU" "Linux Programmer's Manual"
41 .\"O remove \- remove a file or directory
42 remove \- ファイルやディレクトリを削除する
47 .BI "int remove(const char *" pathname );
51 .\"O deletes a name from the filesystem.
58 はファイルシステムからファイル名を削除する。
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.
69 ファイルへの最後のリンクで、かつ、どのプロセスもそのファイルを
70 開いていないなら、ファイルも削除する。ファイルの占めていた
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) が閉じられるまでファイルは存在し続ける。
81 .\"O If the name referred to a symbolic link, the link is removed.
82 名前が指しているのがシンボリックリンクなら、そのリンクを削除する。
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"
90 .\"O On success, zero is returned.
91 .\"O On error, \-1 is returned, and
93 .\"O is set appropriately.
94 成功すれば 0 が返る。エラーなら \-1 が返り、
99 .\"O The errors that occur are those for
108 .\"O .SH "CONFORMING TO"
110 C89, C99, 4.3BSD, POSIX.1-2001.
113 .\"O Under libc4 and libc5,
115 .\"O was an alias for
117 .\"O (and hence would not remove directories).
122 の別名であった (従ってディレクトリを削除できなかった)。
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 想定できない形で削除されることがありえる。