delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/28/10:32:10

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Robert Pendell <shinji+gmane AT elite-systems DOT org>
Subject: Re: Equivalent of recycle bin?
Date: Mon, 28 Jan 2008 10:30:20 -0500
Lines: 43
Message-ID: <fnksfm$ltl$1@ger.gmane.org>
References: <fnk6s2$9lm$1 AT ger DOT gmane DOT org>
Mime-Version: 1.0
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
In-Reply-To: <fnk6s2$9lm$1@ger.gmane.org>
X-Antivirus: avast! (VPS 080127-1, 01/27/2008), Outbound message
X-Antivirus-Status: Clean
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----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 AT elite-systems DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019