今天進度 : unix - What is the difference between a symbolic link and a hard link? - Stack Overflow
單純翻譯、順帶學習我覺得厲害的答案 :
touch A; touch B;
echo "AAA" > A
echo "BBB" >
log
test@test:~$ touch A; touch B;
test@test:~$ echo "AAA" > A
test@test:~$ echo "BBB" > B
test@test:~$ ls
A B
ln A A-ln-hard
ln -s B B-ln-soft
log
test@test:~$ ln A A-ln-hard
test@test:~$ ln -s B B-ln-soft
test@test:~$ ls
A A-ln-hard B B-ln-soft
test@test:~$ ls -l
total 12
-rw-rw-r-- 2 test test 4 Nov 3 01:32 A
-rw-rw-r-- 2 test test 4 Nov 3 01:32 A-ln-hard
-rw-rw-r-- 1 test test 4 Nov 3 01:32 B
lrwxrwxrwx 1 test test 1 Nov 3 01:33 B-ln-soft -> B
mv A A-new
cat A-ln-hard
log :
test@test:~$ mv A A-new
test@test:~$ cat A-ln-hard
AAA
mv B B-new
cat B-ln-soft
log
test@test:~$ mv B B-new
at B-ln-s
test@test:~$ cat B-ln-soft
cat: B-ln-soft: No such file or directory