SUMMARY: Recovering file using the inode

From: Laszlo Ernesto de Miranda Pinto (
Date: Thu Apr 13 2000 - 12:29:30 CDT

   I received a couple of replies, solved my problem, but didn't really
get an answer for my question. One reply suggested using fsck to reattach
the inode in lost+found; I'll try this in a test environment.

   The other answer did the trick: on Solaris 2.6 and greater (Sol7 in our
case) the /proc filesystem contains a "link" to the open files of a process
( in /proc/<pid>/fd/<fd> ), from where I could copy the file.

   This worked in my case, but I'm still interested if there is some tool
to manually connect an inode to a directory, or a recipe for how to do this
with fsdb.

   Thanks to Michael Sullivan ( and Jay Lessert (
for the suggestions.

Original query:

> We accidentally removed a log file, which is still kept open by the
> original process. We have the inode number of this file. I would like to
> know if it is possible to recover this file, reconnecting this inode to
> a directory. We checked out the fsdb utility, but didn't have any luck
> (some commands, from the examples of the man page doesn't seem to work,
> e.g. <x>:dir=<inode_number>).


Smile! It makes them wonder what you're up to.  

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:06 CDT