OSDN Git Service

07f4a17b345c655c64b55abe111204ca161289b9
[linuxjm/LDP_man-pages.git] / release / man3 / remove.3
1 .\" This file is derived from unlink.2, which has the following copyright:
2 .\"
3 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
4 .\"             and Copyright (C) 1993 Ian Jackson.
5 .\"
6 .\" Edited into remove.3 shape by:
7 .\" Graeme W. Wilford (G.Wilford@ee.surrey.ac.uk) on 13th July 1994
8 .\"
9 .\" %%%LICENSE_START(VERBATIM)
10 .\" Permission is granted to make and distribute verbatim copies of this
11 .\" manual provided the copyright notice and this permission notice are
12 .\" preserved on all copies.
13 .\"
14 .\" Permission is granted to copy and distribute modified versions of this
15 .\" manual under the conditions for verbatim copying, provided that the
16 .\" entire resulting derived work is distributed under the terms of a
17 .\" permission notice identical to this one.
18 .\"
19 .\" Since the Linux kernel and libraries are constantly changing, this
20 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
21 .\" responsibility for errors or omissions, or for damages resulting from
22 .\" the use of the information contained herein.  The author(s) may not
23 .\" have taken the same level of care in the production of this manual,
24 .\" which is licensed free of charge, as they might when working
25 .\" professionally.
26 .\"
27 .\" Formatted or processed versions of this manual, if unaccompanied by
28 .\" the source, must acknowledge the copyright and authors of this work.
29 .\" %%%LICENSE_END
30 .\"
31 .\"*******************************************************************
32 .\"
33 .\" This file was generated with po4a. Translate the source file.
34 .\"
35 .\"*******************************************************************
36 .\"
37 .\" Japanese Version Copyright (c) 1998 Ueyama Rui
38 .\"         all rights reserved.
39 .\" Translated Wed Feb 20 15:01:46 JST 1998
40 .\"         by Ueyama Rui <rui@linux.or.jp>
41 .\" Updated Sat Dec 11 JST 1999 by Kentaro Shirakata <argrath@ub32.org>
42 .\" Updated Mon Feb 17 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
43 .\"
44 .TH REMOVE 3 2008\-12\-03 GNU "Linux Programmer's Manual"
45 .SH 名前
46 remove \- ファイルやディレクトリを削除する
47 .SH 書式
48 \fB#include <stdio.h>\fP
49 .sp
50 \fBint remove(const char *\fP\fIpathname\fP\fB);\fP
51 .SH 説明
52 \fBremove\fP()  deletes a name from the filesystem.  It calls \fBunlink\fP(2)  for
53 files, and \fBrmdir\fP(2)  for directories.
54
55 もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイルを 開いていないなら、ファイルも削除する。ファイルの占めていた
56 領域は他で使うことができるようになる。
57
58 名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開いているなら、ファイルの最後のファイル記述子 (file
59 descriptor) が閉じられるまでファイルは存在し続ける。
60
61 名前が指しているのがシンボリックリンクなら、そのリンクを削除する。
62
63 名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 そのソケットなどを開いているプロセスはそのまま使い続けることができる。
64 .SH 返り値
65 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
66 .SH エラー
67 発生するエラーは \fBunlink\fP(2)  および \fBrmdir\fP(2)  と同じものである。
68 .SH 準拠
69 C89, C99, 4.3BSD, POSIX.1\-2001.
70 .SH 注意
71 libc4 と libc5 においては、 \fBremove\fP()  は \fBunlink\fP(2)  の別名であった
72 (従ってディレクトリを削除できなかった)。
73 .SH バグ
74 NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしまうことがありえる。
75 .SH 関連項目
76 \fBrm\fP(1), \fBunlink\fP(1), \fBlink\fP(2), \fBmknod\fP(2), \fBopen\fP(2), \fBrename\fP(2),
77 \fBrmdir\fP(2), \fBunlink\fP(2), \fBmkfifo\fP(3), \fBsymlink\fP(7)
78 .SH この文書について
79 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
80 である。プロジェクトの説明とバグ報告に関する情報は
81 http://www.kernel.org/doc/man\-pages/ に書かれている。