public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Lars Täuber" <taeuber@bbaw.de>
To: "Manish Katiyar" <mkatiyar@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: undelete still opened file
Date: Fri, 17 Oct 2008 14:33:11 +0200	[thread overview]
Message-ID: <20081017143311.52d50a23.taeuber@bbaw.de> (raw)
In-Reply-To: <ea11fea30810170333n4ba9a681l7b64862834899aac@mail.gmail.com>

Hi Manish,


"Manish Katiyar" <mkatiyar@gmail.com> schrieb:
> > I thought about something in connection with /proc/####/fd/# .
> > Is there any chance to get the file back to normal?
> 
> To some extent yes......

yes I know I could do this:

cat /proc/####/fd/32 > /dir/to/new/file.ext

but then all changes made by the process afterwards are not in the copy.

> You can try the /proc/****/fd/** approach . It has worked for me in
> past......but that was for a running binary.

Of course there is a process still running and works with a file discriptor to the deleted file.

Onother question:
Is the space of the file on the underlying block device already marked as free? Or does this happen after all processes have closed all file descriptors pointing to the file?

I really want to undo the deletion. (get a link/name connected to the root inode of the file again)
Is there a way to do this?

Thanks
Lars

  reply	other threads:[~2008-10-17 12:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 10:08 undelete still opened file Lars Täuber
2008-10-17 10:33 ` Manish Katiyar
2008-10-17 12:33   ` Lars Täuber [this message]
2008-10-17 13:24     ` Theodore Tso
2008-10-17 13:39       ` Lars Täuber
2008-10-17 14:02         ` Manish Katiyar
2008-10-17 16:14         ` Theodore Tso
2008-10-20  7:23           ` Lars Täuber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081017143311.52d50a23.taeuber@bbaw.de \
    --to=taeuber@bbaw.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mkatiyar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox