EXPUNGE

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

NAME

expunge, purge - permanent removal of deleted files  

SYNOPSIS

expunge [ -r ] [ -i ] [ -f ] [ -t n ] [ -n ] [ -v ] [ -l ] [ -s ] [ -m ] [ -y ] [ -- ] [ filename [ ... ]]

purge

 

DESCRIPTION

Expunge and purge permanently remove files which have been marked for deletion using delete(1). Files removed with expunge or purge cannot be recovered, and care should therefore be exercised in the use of these utilities.

Purge is a simple utility which takes no command-line arguments. When it is executed, it searches through the user's entire home directory and finds all files that have been marked for deletion. It then displays a list of the files where are to be removed and prompts for confirmation. A response from the user starting with the letter y will cause the files to be permanently expunged.

Because purge searches through the user's entire home directory, it can take quite a while to complete its search. This is normal.

The filenames passed to expunge on the command-line can be directories (deleted or not deleted) or deleted files. Deleted files or directories are always completely expunged, while the treatment of non-deleted directories depends on the -r command-line option (see below). If no command-line filenames are specified, expunge defaults to the current working directory.

For information about wildcard use with expunge, please see undelete(1).

 

OPTIONS

Expunge accepts the following command-line options:
-r
When a non-deleted directory is passed to expunge, the -r option causes the directory to be searced recursively for deleted files. If the recursive option is not specified, only the direct children of the non-deleted directory are examined. A recursive search of a large directory can take quite a while.
-i
The user is prompted for confirmation with the name of the file and its size in kilobytes before each file or directory is removed.
-f
Used in conjunction with the -l option, this option prevents expunge from prompting for confirmation after listing all the files that are too be deleted. Furthermore, it prevents the printing of error messages.
-tn
Specifies the minimum age (in days) of files to be expunged, measured as the length of time since the last file modification.
-n
No file expunges are performed. Instead, expunge prints to the standard output the files that it would expunge were the -n option not specified.
-v
Causes expunge to report each file as it is expunged, as well as the size of the file and a running total of the number of kilobytes expunged.
-l
Causes expunge to list all found files before expunging them, similar to the actions of purge.
-s
Symbolic links are followed when searching for deleted files.
-m
Mount points are followed when searching for deleted files.
-y
The total number of kilobytes expunged is printed after expunge is finished removing files.
--
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), undelete(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
DESCRIPTION
OPTIONS
SEE ALSO
AUTHOR
RESTRICTIONS

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