MAN page from Old RedHat 5.X safedelete-1.3-4.i386.rpm
safedelchk
Section: User Commands (1)
Index NAME
safedelchk - remove safedeleted files aftera set number of days
SYNOPSIS
safedelchk[
-d nn][
-u]
DESCRIPTION
safedelchkscans a users safedelete directory looking for fileswhich are older than a specified number of days. See the section on how long safedeleted files are keptfor the full details on how this number is determined.
Each user has a safedelete subdirectory within their $HOME directory.The subdirectory name is set during the installation of SafeDeleteand defaults to .Safedelete.See your system administrator for the name of your subdirectory.
Each user also has a log file which contains the names ofthe files they have removed with thesafedeletecommand. The log file name is.safedelete.logand is kept in each users $HOME directory.
Whensafedelchkpurges a safedeleted file the corresponding entry in the user's.safedelete.logis removed.
OPTIONS
- -d nn
specifies the number of days to keep safedeleted files.This option can only be specified when running inadministrator mode.It is ignored when safedelchkruns in user mode.- -u
indicates that user mode should be used when runningsafedelchkas root. Specifying-uwill causesafedelchkto scan only those files safedeleted by root.
NOTE:in order for the-uoption to work correctly you must login as root.If you just su to root,safedelchkwill still pick up your original login name.
PROCESSING MODES
safedelchkhas two modes, user mode and administrator mode.
User modeis entered when the
safedelchkcommand is issued by a non-root user. In
user modeonly that specific users safedelete directory andlog are scanned.
Administrator modeis entered when thesafedelchkcommand is issued by root. Inadministrator modeall users safedelete directories and logs are scanned.Issuingsafedelchkas root automatically enters administrator mode.To run in user mode as root, specify the-uoption.
HOW LONG SAFEDELETED FILES ARE KEPT
There are three elements used in determining how longto keep each safedeleted file, the value of the $SAFEDAYSenvironment variable, the contents of the user's .Safedelrcfile, if the user has one, and the preset maximum numberof days. (The last element is set by the system administratorwhen SafeDelete is installed. See them if you want to knowwhat it is).
In user mode the user's$SAFEDAYSenvironment variable, the .Safedelrccontents, or the preset maximum number of days willdetermine how long to keep each safedeleted file.
If $SAFEDAYS is zero your .Safedelrc file is not checked and all files safedeleted on or before today will be purged.
If $SAFEDAYS is undefined or is set to a non-zero valuethen your .Safedelrc file, if you have one, is checkedfor the file being considered for purging. The number ofdays specified for the file in the .Safedelrc will determinehow long to keep the file safely deleted. If the file isnot found in the .Safedelrc then the value of $SAFEDAYS willbe used. If $SAFEDAYS is undefined then the preset maximumwill be used.
Inadministrator modethe number of days to keep each file is determinedthe same way as in user mode with the value specifiedfor the-doption used in place of the value of $SAFEDAYS.
COMMENTS
safedelchkis intended to be run for each user when they login.If a system-wide number of days is to be enforced forall users, then the following lines should be placedin /etc/profile (for bash users):
- export SAFEDAYS=xx
- safedelchk
csh users should put these lines in /etc/login:
- setenv SAFEDAYS xx
- safedelchk
If it is desired that each user can specify how long to keeptheir safedeleted files then the above lines should be placedin each users .bash_profile (for bash users) or in eachusers .cshrc (for csh users).
Administrator modeexists for those sites that want to make sure thatsafedelchkis run on a periodic basis. A crontab entry can be builtby root to run thesafedelchkcommand on a nightly or weekly basis. Administrator modeis also handy if the filesystem containing the safedeletedfiles begins to fill up and you need a quick way of recoveringdisk space. Just use the-uoption specifying a low number of days.
Release 1.3 Updates
The .safedelete.log is now an ASCII only file (i.e. it containsno binary data). You are required to runsafecnvtbefore running this release of safedelchk.
ENVIRONMENT
safedelchkrecognizes the following environment variables:
- SAFEDAYS
- The number of days to keep safely deleted files. If set tozero no files will be safely deleted. If undefined, this defaultsto the maximum number of days set at installation time.
EXAMPLES
- safedelchk
- When run in user mode will scan only that particular userssafedelete directory and log purging all files older than$SAFEDAYS or the preset maximum if SAFEDAYS is undefined.When run in administrator mode all users safedelete directoriesand logs will be scanned. Files older than the preset maximumwill be purged.
- safedelchk -d 10
- Using the -d option can only be used by root thus causingsafedelchkto execute in administrator mode. This results in all safedeleted files older than 10 days to be purged from the system. If thepreset maximum is less than 10 days, however, that maximum willbe used instead.
SEE ALSO
safedelete(1),
safecnvt(1),
safedelrc(5)
AUTHOR
safedelchkis written and maintained by Jeff Renicker<jrenickerAATTgoodyear.com>.
safedelchkis copyright 1995 by Jeff Renicker. You may freely distribute and modifyit. I request that any modifications be forwarded to me for inclusion infuture releases.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- PROCESSING MODES
- HOW LONG SAFEDELETED FILES ARE KEPT
- COMMENTS
- ENVIRONMENT
- EXAMPLES
- SEE ALSO
- AUTHOR
This document was created byman2html,using the manual pages.