user@DESKTOP-KK4CCE2:~$ mkdir -p ~/foo/bar/
user@DESKTOP-KK4CCE2:~$ touch ~/foo/bar/test.txt
user@DESKTOP-KK4CCE2:~$ mkdir ~/baz/
user@DESKTOP-KK4CCE2:~$ ln -s ~/foo/bar/ ~/baz/bar
user@DESKTOP-KK4CCE2:~$ cd ~/baz/bar/
user@DESKTOP-KK4CCE2:~/baz/bar$ cp test.txt ../
user@DESKTOP-KK4CCE2:~/baz/bar$ cd ..
user@DESKTOP-KK4CCE2:~/baz$ ls
bar
user@DESKTOP-KK4CCE2:~/baz$ cd ~/foo
user@DESKTOP-KK4CCE2:~/foo$ ls
bar test.txt
答案1
问题是,当你cd ~/baz/bar
现在实际上处于~/foo/bar
.只属于你的路出现到达您期望的地方。..
的父目录也是如此~/foo/bar
,实际上是~/foo
.