Equivalent of recycle bin?

2008-01-28 Thread Eric Lilja
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


--
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/



RE: Equivalent of recycle bin?

2008-01-28 Thread Dave Korn


  WARNING:  This email contains SERIOUSLY dangerous advice.  Don't try this at
home kids, DaveK is a highly-trained^H^H^H^H^H^H^H^H reckless nutter.





On 28 January 2008 09:22, 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. =/

#include std_advice.h  ;-)

 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?

  Yep, sysinternals do a thing that patches into the low-level disk drivers
and provides a system-wide recycle bin facility entirely independent of the
Explorer shell recycle bin, it should run just fine underneath cygwin.

looks

  Hmm, I can't seem to find it right now  

web.archive.org

  FUndelete.

looks some more

  Nope, those microsoft scumbags have withdrawn it, presumably because it came
with source code and they hate that, in fact they've entirely erased it from
history, it is an un-software, there's not a mention of it anywhere on
microsoft.com, not even a we have withdrawn this announcement.

  Gotta love that web archive :)

http://web.archive.org/web/20060125011929/www.sysinternals.com/Utilities/Funde
lete.html
http://web.archive.org/web/20060125011929/http://www.sysinternals.com/Files/Fu
ndelete.exe
http://web.archive.org/web/20060125011929/http://www.sysinternals.com/Files/Fu
ndeleteSource.zip

  For those who prefer their URLs unwrapped:

http://tinyurl.com/22zot8  [ homepage ]
http://tinyurl.com/yrcs87  [ exe ]
http://tinyurl.com/yqgmc6  [ sources! ]


  Now, the catch:  This software is unsupported these days and may or may not
work well on anything more recent than win2k.  XP, 2k3 and Vista all introduce
changes to the IFS (installable filesystem) device model, and it's possible
that this code won't play happily with any/and/or/all of them.  It's
impossible to underestimate how dangerous playing with unverified disk filter
drivers is, although the words
AAAaRGHOMYGODWHEREDIDEVERYSINGLEFILEI'VEBEENWORKINGONFORTHEPASTTENYEARSSUDDEN
LYDISAPPEARTO? should give you some feel for the scale of the potential
dangers.  YMMV, I have no knowledge of the situation, it's possible that
everything will be fine, but I cannot recommend trying this software on any
machine that you are not *completely* happy with the idea of wiping and
reinstalling from scratch on.  TAKE LOTS OF BACKUPS!


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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/



Re: Equivalent of recycle bin?

2008-01-28 Thread Robert Pendell

-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
[EMAIL PROTECTED]

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/



Re: Equivalent of recycle bin?

2008-01-28 Thread Brian Mathis
On Mon, Jan 28, 2008 at 9:20 AM, Brian Mathis [EMAIL PROTECTED] wrote:
 On Mon, Jan 28, 2008 at 4:22 AM, Eric Lilja [EMAIL PROTECTED] 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

  No, there is no recycle bin in Linux.  Sorry.  The best you can do
  is do a google for undelete linux and see if any of that helps you.
  You *may* be able to recover the files if you take a bit-for-bit image
  of the disk, then manually look through that X GB file for the disk
  clusters that contain some strings that you remember are in those
  scripts.  Chances are that if you didn't shut down the server
  immediately after, the files are gone.

  Of course you know that you should always have backups, but most
  people need a catastrophe to really understand *how* important they
  are.  Consider this your catastrophe.

OK, so I'm on the cygwin mailing list and a linux mailing list.  Guess
which I thought I was reading? :)

If you are on Windows Server or Vista, Volume Shadow Copy might help
you get those back.

--
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/



Re: Equivalent of recycle bin?

2008-01-28 Thread Brian Mathis
On Mon, Jan 28, 2008 at 4:22 AM, Eric Lilja [EMAIL PROTECTED] 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

No, there is no recycle bin in Linux.  Sorry.  The best you can do
is do a google for undelete linux and see if any of that helps you.
You *may* be able to recover the files if you take a bit-for-bit image
of the disk, then manually look through that X GB file for the disk
clusters that contain some strings that you remember are in those
scripts.  Chances are that if you didn't shut down the server
immediately after, the files are gone.

Of course you know that you should always have backups, but most
people need a catastrophe to really understand *how* important they
are.  Consider this your catastrophe.

--
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/