$ mkdir testln && cd testln
$ echo 123 > source
$ mkdir -p aa/bb/cc/dd
$ ln -s source aa/bb/cc/dd/dest
$ ll aa/bb/cc/dd/
total 8
lrwxr-xr-x 1 sato sato 6 1 12 15:08 dest -> source
$ cat aa/bb/cc/dd/dest
cat: aa/bb/cc/dd/dest: No such file or directory
$ cd aa/bb/cc/dd/
$ ll
total 8
lrwxr-xr-x 1 sato sato 6 1 12 15:08 dest -> source
$ ln -s ../../../../source dest2
$ ll
total 16
lrwxr-xr-x 1 sato sato 6 1 12 15:08 dest -> source
lrwxr-xr-x 1 sato sato 18 1 12 15:10 dest2 -> ../../../../source
如您所见,我做了两个ln
第一个只显示dest -> source
而不是dest -> ../../../../source
,并显示No such file or directory
,为什么会这样?