Re:Unix recovery legend
by hassenben on Tuesday March 23, 2010 @01:38AM
(#1212310)
This should only happen to you once in a lifetime.
and this is why my "rm" is replaced by this script... just moving stuff to another directory (trash) and I clean my trash manually (with at least 2 confirmations)...
With all these precautions, if I delete something important, I don't deserve admin rights :-)
randstring=`date "+%Y-%m-%d_%H-%M-%S"_bak`
while [ ! -z "$1" ]; do
mv -b -S "$randstring" "$1" ~/.local/share/Trash/files
shift
done
and this is why my "rm" is replaced by this script... just moving stuff to another directory (trash) and I clean my trash manually (with at least 2 confirmations)...
With all these precautions, if I delete something important, I don't deserve admin rights :-)
randstring=`date "+%Y-%m-%d_%H-%M-%S"_bak`
while [ ! -z "$1" ]; do mv -b -S "$randstring" "$1" ~/.local/share/Trash/files shift done
-hbt