目前在K Linux的书。看到filesystem这边产生了疑问:
Symbolic Link书上的解释:是一个指向档案的pointer, Linux会查那个pointer并找到该
档案资料
(Symbolic link is a pointer to another filename. When Linux opens a
symbolic link, it reads the pointer and then finds the intended file that
contains the actual data.
Hard Link: It is another directory entry for an existing file
所以Hard Link是有在档案系统中存在的,某个档案的值 一定代表某个档案
而Symbolic Link只是一个pointer 指向某个档案 所以会出现pointer找不到档案变破损
连结
用Windows来理解就是 Hard Link是档案系统的进入点, 而Symbolic Link有点像桌面上的
超连结 这样理解正确吗?
另, Linux的inode到底是什么?和Hard Link有什么不一样?
烦请各位回答 谢谢
作者:
bitlife (BIT一生)
2015-08-03 11:03:00以资料结构解释 档案A,B是hard link,都指向 inode_0而soft link C则是在目录资料内存放A(orB)的路径(绝对or相对), dir_entry_A -> inode_0 dir_entry_B -> inode_0dir_entry_C -> dir_entry_A (or B)