[lug] Filename star
socket at peakpeak.com
socket at peakpeak.com
Sun Jan 2 16:33:58 MST 2000
Subba Rao <subb3 at attglobal.net> writes:
> I guess it is time to implement the 'wastebasket' idea on linux users $HOME.
I'm pretty sure that O'Reilly's "Unix Power Tools" book either has an
example shell script or a pointer to a replacement 'rm' that will
safely put everything away in a temporary directory instead of
removing it, that might as well be called 'wastebasket' if that's what
you like.
I'm back home in Grand Junction for a while, and am not completely
positive that such a tool is actually there, as I didn't bring my
entire book collection along. If it's not, I'm pretty sure someone
could whip up a script for you. If you want to try it yourself, be
real careful of race conditions-- how to handle deleting files of the
same name, multiple directories, things like that. I once posted an
overly trivial perl script here that would dangerously rename a
directory of files according to a regex. Point is, it can be done
correctly if you put a little thought to it, and it's probably worth
your while if you haven't been bitten by commands like 'rm -rf /etc'
before.
Have fun!
--
Chris Riddoch socket at peakpeak.com
Will provide pseudo-insightful commentary for food
http://www.peakpeak.com/~socket
GPG key 1024D/234551DC 1999-07-15 Chris Riddoch <socket at peakpeak.com>
Key fingerprint = 7AAF 5815 837C 070C 6C70 8A15 EFD2 5860 2345 51DC
More information about the LUG
mailing list