


DELETE(1)                USER COMMANDS                  DELETE(1)



NAME
     delete - a recoverable file-deletion utility

SYNOPSIS
     delete [ -r ] [ -i ] [ -f ] [ -n ] [ -v ] [ -e ] [ -F ] [ -D
     ] [ -- ] filename ...

DESCRIPTION
     _D_e_l_e_t_e marks files and directories for later permanent remo-
     val  (by renaming them with a prefix of .#).  Files acciden-
     tally  marked  for   deletion   can   be   recovered   using
     _u_n_d_e_l_e_t_e(_1). Marked files are periodically removed automati-
     cally by the system; they can also be removed on demand (see
     _p_u_r_g_e(1)  and _e_x_p_u_n_g_e(1) for details).  Users can list files
     which have been marked for removal but  have  not  yet  been
     removed using _l_s_d_e_l(1).

     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  _y  the  file  is  removed,  otherwise it
     remains.

     Users wishing to retain the  user  interface  of  _r_m(1)  and
     _r_m_d_i_r(1)  while  still  being  able  to recover accidentally
     removed files can do so by aliasing _r_m to _d_e_l_e_t_e -_F  -_e  and
     _r_m_d_i_r to _d_e_l_e_t_e -_D -_e (see below).

OPTIONS
     _D_e_l_e_t_e accepts the following command-line options:

     -r   If a designated  filename  is  a  non-empty  directory,
          _d_e_l_e_t_e  will  signal  an  error unless the -r option is
          specified.  In that case,  _d_e_l_e_t_e  recursively  deletes
          the  directory's  entire  contents  and  the  directory
          itself.  If the -F option  is  specified  (see  below),
          _d_e_l_e_t_e  will  signal  an error even if the directory is
          empty.

     -i   Causes _d_e_l_e_t_e to ask whether to delete each file,  and,
          in recursive mode, whether to examine each directory.

     -f   Prevents _d_e_l_e_t_e from  asking  any  questions  and  from
          reporting any errors.

     -n   No file removals are performed.  Instead, _d_e_l_e_t_e prints
          to  the  standard output the files that it would remove
          were the -n option not specified.

     -v   Causes _d_e_l_e_t_e to report each file as it is deleted.

     -e   Causes _d_e_l_e_t_e to emulate _r_m(1) and _r_m_d_i_r(1) as much  as



MIT Project AthenaLast change: January 26, 1988                 1






DELETE(1)                USER COMMANDS                  DELETE(1)



          it can (i.e.  error and status messages and other pecu-
          liarities of _r_m(1) and _r_m_d_i_r(_1)).

     -F   Causes _d_e_l_e_t_e to  emulate  _r_m  by  preventing  it  from
          removing  even  empty directories when the -r option is
          not specified.

     -D   Causes _d_e_l_e_t_e to emulate _r_m_d_i_r by  preventing  it  from
          removing anything but empty directories.

     --   Two dashes indicate that all the arguments following it
          are  to  be  treated  as file names, even if they start
          with a dash.

SEE ALSO
     undelete(1), purge(1), expunge(1), lsdel(1), rm(1), rmdir(1)

AUTHOR
     Jonathan I. Kamens (MIT-Project Athena)

COPYRIGHT
     Copyright (c) 1989 by the Massachusetts Institute  of  Tech-
     nology.

     All rights reserved.

     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 docu-
     mentation,  and that the name of the Massachusetts Institute
     of Technology (M.I.T.) not be used in advertising or  publi-
     city  pertaining  to  distribution  of  the software without
     specific, written prior permission.

     M.I.T.  DISCLAIMS  ALL  WARRANTIES  WITH  REGARD   TO   THIS
     SOFTWARE,  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABIL-
     ITY 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 TOR-
     TIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH  THE  USE
     OR PERFORMANCE OF THIS SOFTWARE.











MIT Project AthenaLast change: January 26, 1988                 2



