
RM by mistake solved
By:
mmaruseacph2 on Jan 27th, 2012 | syntax:
Bash | size: 0.25 KB | hits: 214 | expires: Never
# MM: don't delete files, move them to /tmp and let a reboot delete them. Use
# rrm to do the actual remove.
do_rm ()
{
DELDIR='/tmp/deleted_files'
[ -d $DELDIR ] || mkdir -p $DELDIR
mv $@ $DELDIR
}
alias rm='do_rm'
alias rrm='/bin/rm'