链接到特定的inode [英] Link to a specific inode

查看:76
本文介绍了链接到特定的inode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已删除的文件,但仍然保持打开程序的状态.我使用lsof找到了索引节点号.如何创建指向该索引节点的硬链接?

I have a file that was deleted, but is still held open my a program. I found the inode number using lsof. How can I create a hard link back to that inode?

任何代码都可以,但是Perl会很方便.

Any code helps, but Perl would be handy.

推荐答案

从/proc/ pid /fd/ 文件描述符中复制

Copy from /proc/pid/fd/file descriptor

使用lsof查找pid和文件描述符.

Use lsof to find the pid and the file descriptor.

这篇关于链接到特定的inode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆