1 | .\" $Id: delete.1,v 1.8 1999-01-22 23:09:12 ghudson Exp $ |
---|
2 | .\" |
---|
3 | .\" Copyright 1989 by the Massachusetts Institute of Technology. All |
---|
4 | .\" rights reserved. The file /usr/include/mit-copyright.h specifies |
---|
5 | .\" the terms and conditions for redistribution. |
---|
6 | .\" |
---|
7 | .\" |
---|
8 | .TH DELETE 1 "January 26, 1988" "MIT Project Athena" |
---|
9 | .ds ]W MIT Project Athena |
---|
10 | .SH NAME |
---|
11 | delete \- a recoverable file-deletion utility |
---|
12 | .SH SYNOPSIS |
---|
13 | .B delete |
---|
14 | [ |
---|
15 | .B \-r |
---|
16 | ] [ |
---|
17 | .B \-i |
---|
18 | ] [ |
---|
19 | .B \-f |
---|
20 | ] [ |
---|
21 | .B \-n |
---|
22 | ] [ |
---|
23 | .B \-v |
---|
24 | ] [ |
---|
25 | .B \-e |
---|
26 | ] [ |
---|
27 | .B \-F |
---|
28 | ] [ |
---|
29 | .B \-D |
---|
30 | ] [ |
---|
31 | .B \-\|\- |
---|
32 | ] filename ... |
---|
33 | .PP |
---|
34 | .SH DESCRIPTION |
---|
35 | .I Delete |
---|
36 | marks files and directories for later permanent removal (by renaming |
---|
37 | them with a prefix of \fI.#\fR). Files accidentally marked for deletion |
---|
38 | can be recovered using |
---|
39 | .I undelete(1). |
---|
40 | Marked files are periodically |
---|
41 | removed automatically by the system; they can also be removed on demand |
---|
42 | (see \fIpurge\fR(1) and \fIexpunge\fR(1) for details). |
---|
43 | Users can list files which have been marked for |
---|
44 | removal but have not yet been removed using \fIlsdel\fR(1). |
---|
45 | .PP |
---|
46 | If the user does not have write permission to a file, its permissions |
---|
47 | are printed and the user is asked whether the file should be removed. |
---|
48 | If the first character of the response line is \fIy\fR the file is |
---|
49 | removed, otherwise it remains. |
---|
50 | .PP |
---|
51 | Users wishing to retain the user interface of \fIrm\fR(1) |
---|
52 | and \fIrmdir\fR(1) |
---|
53 | while still being able to recover accidentally removed files can do so |
---|
54 | by aliasing |
---|
55 | .I rm |
---|
56 | to |
---|
57 | .I delete \-F \-e |
---|
58 | and |
---|
59 | .I rmdir |
---|
60 | to |
---|
61 | .I delete \-D \-e |
---|
62 | (see below). |
---|
63 | .SH OPTIONS |
---|
64 | .I Delete |
---|
65 | accepts the following command-line options: |
---|
66 | .TP |
---|
67 | .B \-r |
---|
68 | If a designated filename is a non-empty directory, |
---|
69 | .I delete |
---|
70 | will signal an error unless the |
---|
71 | .B \-r |
---|
72 | option is specified. In that case, |
---|
73 | .I delete |
---|
74 | recursively deletes the directory's entire contents and the directory |
---|
75 | itself. If the |
---|
76 | .B \-F |
---|
77 | option is specified (see below), |
---|
78 | .I delete |
---|
79 | will signal an error even if the directory is empty. |
---|
80 | .TP |
---|
81 | .B \-i |
---|
82 | Causes |
---|
83 | .I delete |
---|
84 | to ask whether to delete each file, and, in recursive |
---|
85 | mode, whether to examine each directory. |
---|
86 | .TP |
---|
87 | .B \-f |
---|
88 | Prevents |
---|
89 | .I delete |
---|
90 | from asking any questions and from reporting any errors. |
---|
91 | .TP |
---|
92 | .B \-n |
---|
93 | No file removals are performed. Instead, |
---|
94 | .I delete |
---|
95 | prints to the standard output the files that it would remove were the |
---|
96 | .B \-n |
---|
97 | option not specified. |
---|
98 | .TP |
---|
99 | .B \-v |
---|
100 | Causes |
---|
101 | .I delete |
---|
102 | to report each file as it is deleted. |
---|
103 | .TP |
---|
104 | .B \-e |
---|
105 | Causes |
---|
106 | .I delete |
---|
107 | to emulate \fIrm\fR(1) and \fIrmdir\fR(1) as much as it can (i.e. |
---|
108 | error and status messages and other peculiarities of \fIrm\fR(1) and |
---|
109 | \fIrmdir\fI(1)). |
---|
110 | .TP |
---|
111 | .B \-F |
---|
112 | Causes |
---|
113 | .I delete |
---|
114 | to emulate |
---|
115 | .I rm |
---|
116 | by preventing it from removing even empty directories when the |
---|
117 | .B \-r |
---|
118 | option is not specified. |
---|
119 | .TP |
---|
120 | .B \-D |
---|
121 | Causes |
---|
122 | .I delete |
---|
123 | to emulate |
---|
124 | .I rmdir |
---|
125 | by preventing it from removing anything but empty directories. |
---|
126 | .TP |
---|
127 | .B \-\|\- |
---|
128 | Two dashes indicate that all the arguments following it are to be treated as |
---|
129 | file names, even if they start with a dash. |
---|
130 | .SH "SEE ALSO" |
---|
131 | undelete(1), purge(1), expunge(1), lsdel(1), rm(1), rmdir(1) |
---|
132 | .SH BUGS |
---|
133 | .I Delete |
---|
134 | may change the access and modification times on a file when it is |
---|
135 | deleted. This is necessary in order to guarantee that |
---|
136 | .I expunge |
---|
137 | will work correctly in |
---|
138 | .I AFS |
---|
139 | filesystems. You might say that this is a bug in |
---|
140 | .IR AFS , |
---|
141 | rather than a bug in |
---|
142 | .IR delete . |
---|
143 | .SH AUTHOR |
---|
144 | Jonathan I. Kamens (MIT-Project Athena) |
---|
145 | .SH COPYRIGHT |
---|
146 | Copyright (c) 1989 by the Massachusetts Institute of Technology. |
---|
147 | .PP |
---|
148 | All rights reserved. |
---|
149 | .PP |
---|
150 | Permission to use, copy, modify, and distribute this software and its |
---|
151 | documentation for any purpose and without fee is hereby granted, |
---|
152 | provided that the above copyright notice appear in all copies and that |
---|
153 | both that copyright notice and this permission notice appear in |
---|
154 | supporting documentation, and that the name of the Massachusetts |
---|
155 | Institute of Technology (M.I.T.) not be used in advertising or publicity |
---|
156 | pertaining to distribution of the software without specific, written |
---|
157 | prior permission. |
---|
158 | .PP |
---|
159 | M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING |
---|
160 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL |
---|
161 | M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR |
---|
162 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, |
---|
163 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, |
---|
164 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
---|
165 | SOFTWARE. |
---|
166 | |
---|
167 | |
---|