1.创建文件:
touch 1.txt
2.循环
for i in {0..1000}; do fuser 1.txt;done
3.观看约 50 次失败:
...
Cannot stat file /proc/16927/fd/0: No such file or directory
Cannot stat file /proc/17821/fd/0: No such file or directory
Cannot stat file /proc/17823/fd/0: No such file or directory
...
4.为什么会失败?
5.附加信息:本地 FS、ext3、stat 始终返回有效响应、'selinux' 关闭
最佳答案
我假设 fuser
遍历正在运行的进程并查找指向相关文件的打开的 fd
,并且在该尝试期间,一些进程在 fuser
检查它们期间死亡。 – 伊坦·雷斯纳
关于linux - Fuser 无法统计文件 - 奇怪的行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29134268/