Safe Delete

       Safedelete  provides  a  way  to  safely  delete  files  so they can be undeleted on demand. 
Safedelete <deletes files>  files by copying them to a safedelete  directory  - "$HOME/.trash". Files processed by safedelete are given a new unique  filename  after  they  are placed in the ".trash" directory.  This allows multiple copies of the same file to be safe-deleted without having to  worry  about  collisions with existing files.

       Each user has a log file containing the names of all the files they can currently undelete 
(see  the  undelete  manual  page  for  details  on undeleting files).  The log file name is
.safedelete.log and is kept in each users "$HOME/.trash" directory.

To Install safedelete:
1. Download this RPM file  (safedelete-1.3-10.i386) and install it on your linux system, as follows:
rpm -Uvh  safedelete-1.3-10.i386.rpm

Creating a few aliases to make things easier:
1. As root modify your /etc/bashrc file to include these (or simalar) aliases.
# aliases added to support safe delete (efa) 4/12/03
alias del="rm -v"
alias delete="rm -v"
alias rm="/usr/bin/safedelete"
alias undel="/usr/bin/undelete"
# undeldir ./dirname/*
alias undeldir="/usr/bin/undelete -a -r -p "

The above changes will allow you to use:

del <filename>          to actually delete a file (non-recoverable)
delete <filename>      to actually delete a file (non-recoverable)

rm <filename>            to safedelete a file
(recover with undel or undelete)
rm -r <directory>       to safedelete a directory (recover with undeldir)

undel <directory>       to recover a directory and all it's files which has been safe-deleted.


*** These aliases are confortable for me; you should use aliases that are easy for you to remember and use.