X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Robert Pendell Subject: Re: Equivalent of recycle bin? Date: Mon, 28 Jan 2008 10:30:20 -0500 Lines: 43 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/