您的当前位置:首页 --> CentOS入门
CentOS下查看一个文件的硬链接数
浏览次数:2688 关键词 ( 链接  文件  CentOS  )

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

[root@localhost tmp]# ls -li
total 104
229415 drwxr-xr-x  2 root root 4096 Dec 11 21:15 etc
 39757 -rw-r--r--  2 root 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,

下载次数:39
下载地址:点击下载
本资源为程序自动采集,如有侵权请联系我们移除 admin#80vps.com 来信请将#替换为@
下一条 centos系统中网络配置相关
上一条 yum和apt-get有什么区别

拥有超过10年的业务管理经验。我们是IDC服务和解决方案方面的专家

有任何疑问请不要犹豫,立即点击联系我们