On 3/19/06, Dvir Volk <[EMAIL PROTECTED]> wrote:
> Ok, so I made a very stupid mistake and this is the situation:
> I have a running process with an open FD to a file, but the file was
> deleted by rm, hence it's not addressable from anywhere in the
> filesystem (ext3). once i close the process, the file will be deleted.
> Is there anyting i can do to recover the file and link it to another
> filename, so it won't be deleted when the process exits?

Sure.

<<<
ls -la /proc/{PID}/fd | awk  '/(deleted)/ { print "cp "$8" "$10 }'
>>>

See which one(s) you need to relink and then just run the command.



* This on debian 3.1-sarge, other distributions might have a different
output for `ls -la` ?

> --
>   Dvir Volk
>   [EMAIL PROTECTED]
>
>
>

--
Cheers,
Maxim Vexler (hq4ever).

Do u GNU ?

Reply via email to