on debian you have to uncomment this in ~root/.bashrc
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
Another pretty dangerous is
Imagine you want to get rid of .files
rm -rf .*
bam .. is taken by .* , you're lost
In this case, depending on your FileSystem (how long it takes to write back to disk), one thing to do is pull the plug quickly or do a hardreset. For Ext3 you have 5seconds, for XFS you have longer.
Otherwise, if tool late, do not reboot and inspect /proc/kcore if you have it (make a copy to your disk). Depending on the amount of ram it will take you more or less time. You can also make a dump of your swap space to a file with dd for example.
If you have ext2, use unrm.
In anycase, do some backups, even on the same disk if you can't be bothered to use a cd writer. It will keep you safe from these mistakes.