OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / gnumaniak / original / man1 / rm.1
1 .\" Copyright Andries Brouwer, A. Wik 1998, Ragnar Hojland Espinosa 1998-2002
2 .\"
3 .\" This file may be copied under the conditions described
4 .\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998
5 .\" that should have been distributed together with this file.
6 .\"
7 .TH RM 1 "18 June 2002" "GNU fileutils 4.1"
8 .SH NAME
9 rm \- remove files or directories
10 .SH SYNOPSIS
11 .BI "rm [" options "] " file...
12 .sp
13 POSIX options:
14 .B [\-fiRr]
15 .sp
16 GNU options (shortest form):
17 .B [\-dfirvR]
18 .B "[\-\-help] [\-\-version] [\-\-]"
19 .SH DESCRIPTION
20 .B rm
21 removes each given
22 .IR file .
23 By default, it does not remove directories.
24 But when the \-r or \-R option is given, the entire directory tree
25 below the specified directory is removed (and there are no limitations
26 on the depth of directory trees that can be removed by `rm -r').
27 It is an error when the last path component of
28 .I file
29 is either . or ..
30 (so as to avoid unpleasant surprises with `rm -r .*' or so).
31 .PP
32 If the \-i option is given, or
33 if a file is unwritable, standard input is a terminal, and the
34 .B "\-f"
35 option is not given,
36 .B rm
37 prompts the user for whether to remove the file, writing a question
38 to stderr and reading an answer from stdin.  If the response
39 is not affirmative, the file is skipped.
40 .SH "POSIX OPTIONS"
41 .TP
42 .B "\-f"
43 Do not prompt for confirmation. Do not write diagnostic messages.
44 Do not produce an error return status if the only errors were
45 nonexisting files.
46 .TP
47 .B "\-i"
48 Prompt for confirmation.
49 (In case both \-f and \-i are given, the last one given takes effect.)
50 .TP
51 .BR "\-r" " or " "\-R"
52 Recursively remove directory trees.
53 .SH "SVID DETAILS"
54 The System V Interface Definition forbids removal of the
55 last link to an executable binary file that is being executed.
56 .SH "GNU DETAILS"
57 The GNU implementation (in fileutils-3.16) is broken in the sense
58 that there is an upper limit to the depth of hierarchies that can be
59 removed. (If necessary, a utility `deltree' can be used to remove
60 very deep trees.)
61 .SH "GNU OPTIONS"
62 .TP
63 .B "\-d, \-\-directory"
64 Remove directories with
65 .BR unlink (2)
66 instead of 
67 .BR rmdir (2),
68 and don't
69 require a directory to be empty before trying to unlink it.  Only
70 works if you have appropriate privileges.  Because unlinking a
71 directory causes any files in the deleted directory to become
72 unreferenced, it is wise to 
73 .BR fsck (8)
74 the filesystem after doing this.
75 .TP
76 .B "\-f, \-\-force"
77 Ignore nonexistent files and never prompt the user.
78 .TP
79 .B "\-i, \-\-interactive"
80 Prompt whether to remove each file.  If the response does not begin with `y'
81 or `Y', the file is skipped.  Ignore previous \fB\-\-force\fR options.
82 .TP
83 .B "\-r, \-R, \-\-recursive"
84 Remove the contents of directories recursively.
85 .TP
86 .B "\-v, \-\-verbose"
87 Print the name of each file before removing it.
88 .SH "GNU STANDARD OPTIONS"
89 .TP
90 .B "\-\-help"
91 Print a usage message on standard output and exit successfully.
92 .TP
93 .B "\-\-version"
94 Print version information on standard output, then exit successfully.
95 .TP
96 .B "\-\-"
97 Terminate option list.
98 .SH ENVIRONMENT
99 The variables LANG, LC_ALL, LC_COLLATE, LC_CTYPE and LC_MESSAGES have the
100 usual meaning.
101 .SH "CONFORMING TO"
102 POSIX 1003.2, except for the limitation on file hierarchy depth.
103 .SH NOTES
104 This page describes
105 .B rm
106 as found in the fileutils-4.1 package;
107 other versions may differ slightly. Mail corrections and additions to
108 aeb@cwi.nl and aw@mail1.bet1.puv.fi and ragnar@ragnar-hojland.com
109 Report bugs in the program to bug-fileutils@gnu.org.