軟連接會不會有Bug?
軟連接會不會有Bug??
ln -s sourceFile targetFile;
rm -rf sourceFile;
touch sourceFile;
前后兩個sourceFile的i節(jié)點是不一樣的,但是targetFile能夠鏈到兩個不同的sourceFile去。這種設(shè)定是不是有點不合理啊,而且跟老師講的,數(shù)據(jù)塊里面存的是sourceFile的i節(jié)點等信息這一說法,不一致。
temp@temp:~/20170325$ ls -il
total 24
9045987 lrwxr-xr-x ?1 temp ?staff ? 7 ?3 25 19:56 122.a -> 123.txt
9046693 -rw-r--r-- ?1 temp ?staff ? 7 ?3 25 20:05 123.txt
temp@temp:~/20170325$ rm 123.txt
temp@temp:~/20170325$ touch 123.txt
temp@temp:~/20170325$ ls -il
total 16
9045987 lrwxr-xr-x ?1 temp ?staff ? 7 ?3 25 19:56 122.a -> 123.txt
9046880 -rw-r--r-- ?1 temp ?staff ? 0 ?3 25 20:07 123.txt
2017-03-25
應(yīng)該沒有