From: Rudolf Polzer Date: 2002-12-08T09:17:36+09:00 Subject: Re: Thank God for backups Scripsit ille David Garamond : > Gavin Sinclair wrote: [...] > >>This could have been a tragedy if I didn't have a recent backup made on a > >>sepparate directory. Since I did, I actually lost very little work. > > Also: > > CVS > > alias rm='rm -i' > > vim: set backupdir=/tmp [I presume the *~ files come from vim?] > > although there is no substitute for backups, it's amazing to see that > over the years the unix CLI hasn't got a good replacement for "rm" that > does trash-can-thingy (or some filesystem features added on to > ext2/ext3/reiserfs that makes undeletion possible). the best distros > come up with is putting the "rm -i" alias. i find "rm -i" very annoying. /usr/local/bin/recycle: | #!/bin/sh | | mkdir -p "$HOME/.recycled" | | for x in "$@"; do | if [ "`echo "$x" | cut -f 1 -d /`" != '' ]; then | x="`pwd`/$x"; | fi | y="`echo "$x" | sed 's/-/-_/g;s/\//--/g'`" | mv "$x" "$HOME/.recycled/$y" | done ..bashrc: | alias rm=recycle -- Why slrn? Gnus is much too easy... to pronounce.