Re: Is there a remedy to this mistake?

From: Stephane CHAZELAS (this.address_at_is.invalid)
Date: 11/09/04


Date: Tue, 9 Nov 2004 20:05:58 +0000

2004-11-9, 11:39(-08), RK:
[...]
> I have an application that outputs some text information to a file
> (f1) every few seconds. By mistake, I compressed this f1 while the
> application was running (compress -f f1, then I got f1.Z).
>
> After the application was done, I noticed this mistake, of course,
> f1.Z was truncated by the time it was compressed. I know this is
> almost impossible, but is there a way that I can retrieve the
> information after that f1 was compressed?
[...]

compress writes the compressed file to f1.Z and then unlinks f1.
So you have no more chance to recover f1 than you'd have had if
you had done a "rm f1".

You could have done something when the application was still
running (using /proc/<pid>/fd or ptrace), but once the
application is terminated, the file is effectively and
definitively lost.

Undelete technics might give some results (see e2undel or mc for
instance on a ext2 (linux, hurd) file system).

-- 
Stephane


Relevant Pages

  • compressed messages
    ... A window appeared in Outlook Express asking if I wanted to compress my ... messages to save space by mistake I clicked ok. ...
    (microsoft.public.windowsxp.general)
  • Re: DAHON HELIOS--better than Brompton?
    ... Folding is only an issue on rugged terrain and IME never proceeded to a dangerous degree. ... Once you compress the rubber it tends to unclip itself which in one way is nice - just jump on the bike and its ready to fold at the other ... "I did make a mistake once - I thought I'd made a mistake but I hadn't" Anon ...
    (uk.rec.cycling)
  • how do I uncompress
    ... I started to compress my files (mistake), and I need to reverse the action. ... Can I do it through DOS, and if so, how? ...
    (microsoft.public.windowsxp.general)