.\" $Source: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.bin/delete/man1/RCS/delete.1,v $ .\" $Author: probe $ .\" $Header: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.bin/delete/man1/RCS/delete.1,v 1.7 93/02/09 00:36:05 probe Exp $ .\" .\" Copyright 1989 by the Massachusetts Institute of Technology. All .\" rights reserved. The file /usr/include/mit-copyright.h specifies .\" the terms and conditions for redistribution. .\" .\" .TH DELETE 1 "January 26, 1988" "MIT Project Athena" .ds ]W MIT Project Athena .SH NAME delete \- a recoverable file-deletion utility .SH SYNOPSIS .B delete [ .B \-r ] [ .B \-i ] [ .B \-f ] [ .B \-n ] [ .B \-v ] [ .B \-e ] [ .B \-F ] [ .B \-D ] [ .B \-\|\- ] filename ... .PP .SH DESCRIPTION .I Delete marks files and directories for later permanent removal (by renaming them with a prefix of \fI.#\fR). Files accidentally marked for deletion can be recovered using .I undelete(1). Marked files are periodically removed automatically by the system; they can also be removed on demand (see \fIpurge\fR(1) and \fIexpunge\fR(1) for details). Users can list files which have been marked for removal but have not yet been removed using \fIlsdel\fR(1). .PP If the user does not have write permission to a file, its permissions are printed and the user is asked whether the file should be removed. If the first character of the response line is \fIy\fR the file is removed, otherwise it remains. .PP Users wishing to retain the user interface of \fIrm\fR(1) and \fIrmdir\fR(1) while still being able to recover accidentally removed files can do so by aliasing .I rm to .I delete \-F \-e and .I rmdir to .I delete \-D \-e (see below). .SH OPTIONS .I Delete accepts the following command-line options: .TP .B \-r If a designated filename is a non-empty directory, .I delete will signal an error unless the .B \-r option is specified. In that case, .I delete recursively deletes the directory's entire contents and the directory itself. If the .B \-F option is specified (see below), .I delete will signal an error even if the directory is empty. .TP .B \-i Causes .I delete to ask whether to delete each file, and, in recursive mode, whether to examine each directory. .TP .B \-f Prevents .I delete from asking any questions and from reporting any errors. .TP .B \-n No file removals are performed. Instead, .I delete prints to the standard output the files that it would remove were the .B \-n option not specified. .TP .B \-v Causes .I delete to report each file as it is deleted. .TP .B \-e Causes .I delete to emulate \fIrm\fR(1) and \fIrmdir\fR(1) as much as it can (i.e. error and status messages and other peculiarities of \fIrm\fR(1) and \fIrmdir\fI(1)). .TP .B \-F Causes .I delete to emulate .I rm by preventing it from removing even empty directories when the .B \-r option is not specified. .TP .B \-D Causes .I delete to emulate .I rmdir by preventing it from removing anything but empty directories. .TP .B \-\|\- Two dashes indicate that all the arguments following it are to be treated as file names, even if they start with a dash. .SH "SEE ALSO" undelete(1), purge(1), expunge(1), lsdel(1), rm(1), rmdir(1) .SH BUGS .I Delete may change the access and modification times on a file when it is deleted. This is necessary in order to guarantee that .I expunge will work correctly in .I AFS filesystems. You might say that this is a bug in .IR AFS , rather than a bug in .IR delete . .SH AUTHOR Jonathan I. Kamens (MIT-Project Athena) .SH COPYRIGHT Copyright (c) 1989 by the Massachusetts Institute of Technology. .PP All rights reserved. .PP Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the Massachusetts Institute of Technology (M.I.T.) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. .PP M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.