CentOS下如何查看一个文件的硬链接数?

2023-12-04 0 319

用ls -l 可以看到有一个文档的硬链接数

[root@localhost tmp]# ls -li

total 104

229415drwxr-xr-x2root root 4096 Dec 11 21:15 etc

39757-rw-r–r–2root root 1602 Oct 30 14:56 hl_passwd

用一下语句可以查看一个文件有哪些硬链接

[root@localhost tmp]# find / -inum 39757

find: /proc/6266/task/6266/fd/4: No such file or directory

/etc/passwd

/tmp/hl_passwd

但是注意由于硬链接是不能跨文件系统的,所以

Add the `-xdev\’ option if you are starting the

search at a directory that has other filesystems mounted on it,

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 RedHat/Centos CentOS下如何查看一个文件的硬链接数? https://www.u-9.cn/system/redhatcentos/80902.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务