UNDELETE

Section: User Commands (1)
Updated: January 26, 1988
Index Return to Main Contents
 

NAME

undelete - recover files removed by delete  

SYNOPSIS

undelete [ -r ] [ -i ] [ -f ] [ -v ] [ -n ] [ -R ] [ -- ] [ filename [ ... ]]

Undelete recovers files and directories that have been marked for permanent removal by delete(1), but have not yet been removed.

Filenames passed to undelete can be directories or deleted files. If a directory that is not deleted is passed to undelete, then the deleted files or directories in it will be restored; if the recursive option is specified, then all deleted files or directories in any of its children will be restored as well.

The shell wildcards * and ?, as well as shell brace notation using [ and ], are interpreted correctly by undelete. It is possible to pass wildcards to the program without the wildcards being intercepted by the shell by setting noglob (in csh) or by quoting the wildcards. To delete a file that actually has a wildcard in its name, you must precede the quoted wildcard with a quoted backslash.

If no files are specified on the command line, undelete goes into interactive mode. In interactive mode, the user is prompted to enter files to be restored, one file per line. Typing a carriage return on an empty prompt line exits the program.

Wildcards and quoting backslashes can be entered directly at the prompt without any shell interference (which is the main reason there is an interactive mode).  

OPTIONS

Undelete accepts the following command-line options:
-r
If a specified file is a directory, the directory and all of its children are restored recursively.
-i
The user is prompted for confirmation before each file or directory is restored. This is not the same as the interactive file name entry mode which is automatically activated when no files are specified on the command line.
-f
Prevents undelete from reporting errors. Further, if an intact (undeleted) version of a file which is requested for undeletion exists, then undelete will not prompt for confirmation before overwriting the undeleted file with the recovered one.
-v
Causes undelete to report each file as it is restored. Also, causes an introductory message to be printed when entering interactive mode.
-n
No file recoveries are performed. Instead, undelete prints to the standard output the files that it would recover were the -n option not specified.
-R
Prevents undelete from restoring the contents of directories in any case.
--
Two dashes indicate that all arguments following it are to be treated as file names, even if they start with a dash.
 

SEE ALSO

delete(1), purge(1), expunge(1), lsdel(1), rm(1), rmdir(1)  

AUTHOR

Jonathan I. Kamens (MIT-Project Athena)  

RESTRICTIONS

Copyright (c) 1989 by the Massachusetts Institute of Technology. All rights reserved. Delete(1) specifies the terms and conditions for redistribution.


 

Index

NAME
SYNOPSIS
OPTIONS
SEE ALSO
AUTHOR
RESTRICTIONS

This document was created by man2html, using the manual pages.
Time: 21:50:10 GMT, February 02, 2023