Creating a nondestructive 'rm'

Matt Burdick burdick at hpindda.HP.COM
Fri Nov 4 04:13:07 AEST 1988


Does anyone have a nice alias or shell script so that when I 'rm' a file it
will actually move it to, for instance, a tmp subdirectory in my home
directory?

Right now, I have an alias that does this, but the problem is that may
alias doesn't handle all of rm's flags.  For instance, it complains if I
type in 'rm -rf *', since 'mv' doesn't have the -r flag and also can't move
across file partitions.

-- 
Matt Burdick                    | Hewlett-Packard
burdick%hpda at hplabs.hp.com      | Technical Communications Lab



More information about the Comp.unix.questions mailing list