[NCLUG] refcount++ ?
Eric Brunson
brunson at level3.net
Tue Oct 30 23:19:52 MST 2001
Find the pids of the processes that have the files open and cd to
/proc/<pid>/fd. 0, 1 and 2 are stdin, out and err for that process
and there will be a link to every other file the process has open. If
you can't figure out how to reattach the inode you can at least cat
the contents into a new file.
* Benson Chow (blc at q.dyndns.org) [011030 21:32]:
> Ok, a sorta newbie question here.
>
> I was running a program and it was generating an output file on /tmp.
>
> Then cron had fun with rm. I suppose find(1) wasn't invoked properly.
>
> So I have two files that are still referenced in memory so the inodes
> still exist on the disk... Is there a way to reattach those inodes to a real
> file somewhere?
>
> Sadly, reiserfs might be a problem... but maybe not...
>
> Thanks for any ideas,
>
> -bc
>
>
> _______________________________________________
> NCLUG mailing list
> NCLUG at nclug.org
> http://www.nclug.org/mailman/listinfo/nclug
--
Eric Brunson brunson at level3.net page-eric at level3.net
tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY
More information about the NCLUG
mailing list