Equivalent of recycle bin?

Robert Pendell shinji+gmane@elite-systems.org
Mon Jan 28 17:57:00 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Lilja wrote:
| Hello, I messed up royally today when I was merging two bash scripts.
| When I was going to test if my argument handling worked I had forgot to
| comment out a call to "rm -f" that took a relative path and since the
| script wasn't executed where it was supposed to it removed several
| files. Many of those are easily replaced but some were source files that
| have been modified the past months and the last backup was from july
| 23rd 2007. =/
|
| I know I should robustify my script but I was wondering if there's an
| equivalent of the recycle bin I can use so I can easily restore files
| that were not supposed to be deleted?
|
| - Eric
|
|

You can script a form of a recycle bin.  The admin over on the NetBSD
server that I login to did that.  Basically what you would want to do is
setup a special folder, alias a command to rm so the shell will use that
instead of the real rm, and then setup the script to move the files
instead of deleting them.  Unfortunately the admin didn't put the script
into public domain so I can't actually post it.  Unfortunately I won't
be of much help beyond this but I did want to just drop by and let you
know it _can_ be done.

- --
Robert Pendell
shinji@elite-systems.org

Thawte Web of Trust Notary
CAcert Assurer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHnfUKs1pR2j1qW+sRAj+vAJoChbPgDoIiNqXUXGQzfq//g6rHPgCeNbYJ
rUqNwvtyg/pCSpjcG8oLdHQ=
=YcqG
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list