in reply to Re^2: locate path to a file from inode number
in thread locate path to a file from inode number

This is what fsck does - it'll link unreferenced inodes to lost+found.

Abigail

Replies are listed 'Best First'.
Re^2: locate path to a file from inode number
by Aristotle (Chancellor) on Nov 11, 2002 at 17:16 UTC
    I am aware of that. What I was wondering is whether there is a system call or something of the like available to a regular program, so that one could create a link to a file given merely an open handle to it. In other words, is there any way to re-link a temporary file that has no links before it vanishes?

    Makeshifts last the longest.

      It's probably unlikely that there's a system call for that, as it will be a file system specific operation. If such a tool would be written, it should use the character device to access the filesystem, and used very very carefully.

      And of course, it would require root privilidges. Not that I'm aware such a program exists.

      Abigail