"lsof"表示将文件显示为(已删除),但我仍然可以在文件系统中看到它 [英] "lsof" shows a file as (deleted) but I can still see it in file system

查看:116
本文介绍了"lsof"表示将文件显示为(已删除),但我仍然可以在文件系统中看到它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux 2.6.27中:

in Linux 2.6.27:

从"lsof"输出中,我看到一个包含打开的fd和(已删除)文件的进程.奇怪的是,我仍然可以使用"ls"在文件系统中看到该文件.这是为什么?

From "lsof" output I see a process holding open fd with a (deleted) file. The strange thing is that I can still see the file in the file system using "ls". Why is that?

谢谢.

推荐答案

删除文件后,在文件系统上将看不到该文件.但是,很有可能在同一位置创建了另一个具有相同文件名的文件.

When a file is deleted it would not been seen on the file system. However, it is quite possible another file with the same file name is created on the same location.

您可以检查lsofls -i中显示的节点号,以检查它们是否确实是同一文件.

You can check the node number shown in lsof and ls -i to check whether they are really the same file.

这篇关于"lsof"表示将文件显示为(已删除),但我仍然可以在文件系统中看到它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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