From: krej@electrum.kth.se (Kristian Ejvind) Subject: Changeing behaviour of rm Date: 23 Jul 1992 20:42:25 GMT
In article <1992Jul23.145332.1393@sspiff.ampr.ab.ca> dje@sspiff.ampr.ab.ca (Doug Evans) writes:
> Some people have versions of rm that work like the
> Macintosh trash can: the deleted files get moved to a temporary place
> so they can be recovered if the deletion was in error.
> But "rm" as shipped doesn't work like that.
>
> You're only human and you *will* delete a file or make some other
> silly mistake. Use the protection features of the o/s to protect
> you from yourself.
> --
> Doug Evans | "You're just supposed to sit here?"
> dje@sspiff.ampr.ab.ca | - Worf in a mud bath.
A rm with this behaviour is *easy* to create (at least if you're in
tcsh as I am..):
alias rm 'mv \!* ~/.wastebin'
this will move your deleted files to the directory .wastebin (which
you have to create first!). I have had in my plans for a while (on
second thought, a very long while :-) to add a few lines to my .login
to 1) alias rm as above and 2) check ~/.wastebin for size and revome
the oldest files, but I reccon I will do that first after I deleted
THAT VERY important file........
/Kristian
p.s. When rm is aliased as above, rm's options won't work (exept for -f)!