Linux 链接

Linux系统中链接分为两种硬链(hard link)和软链(soft link)也叫符号链接

每个文件都有唯一的inode,多个硬链可以指向同一inode;软链指向文件路径,可以称作快捷方式

创建硬链 ln targetfile linkfile

创建软链 ln -s targetfile linkfile

在某(些)目录(dirs)中查找特定文件的所有硬链接

1通过文件名称 find dirs -samefile filename

2通过文件的inode  find dirs -inum inodeval

在某(些)目录(dirs)中查找特定文件的软链接

find dirs -lname "*filename"使用*匹配

猜你喜欢

转载自free-man135.iteye.com/blog/2094725