Can I create a link to an inode?

Russell Miller duskglow at gmail.com
Fri Aug 15 07:30:23 UTC 2008


On Fri, Aug 15, 2008 at 12:17 AM, Doug Wyatt <dwyatt at sunflower.com> wrote:

> Here's the situation - I have video file, currently open
> in Mplayer, which I accidentally deleted from its directory.
>
> So, the storage and inode still exist as long as I don't
> close the Mplayer.
>
> Does anyone know of a way, using available commands or via
> system calls in a program, to reestablish a link from a
> directory to the inode?
>


You might try going into debugfs, finding the inode, and seeing if you can
tell it it's not deleted anymore.  It's not actually deleted until all the
references are closed, so I think it might be possible (I don't know the
internal details of what happens when a file is deleted but not closed so I
may be wrong).

It's very, very risky, and you risk corrupting your entire filesystem doing
that.  I wouldn't do it personally unless I had good backups.

Let me know if you try it and it works - that would make a good howto
somewhere.

--Russell


>
> Thanks in advance,
> Doug
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080815/7620ce28/attachment-0001.htm>


More information about the fedora-list mailing list