我在我的电脑上安装了 cygwin64,然后从终端创建了一些如下符号链接:
%ln -s /cygdrive/c /c
%ln -s /cygdrive/z /z
之后我错误地创建了错误的链接:
%ln -s /cygdrive/x /z
和
%ln -s /cygdrive/z /z
然后我意识到了这一点并想删除“x”和“z”符号链接但失败了。
我有这张照片:
pwd: /cygdrive/z
$ ls -l
total 58
drwxrwx---+ 1 VHA01+User(214401) Domain Users 0 Sep 23 16:28 abcLZ
-rwxrwx---+ 1 Unknown+User Unknown+Group 1404 Jan 13 22:20 'Shortcut to abcLZ.lnk'
-rwxrwx---+ 1 Unknown+User Unknown+Group 47104 Dec 13 15:06 Thumbs.db
lrwxrwxrwx 1 Unknown+User Unknown+Group 1 Jul 31 08:12 x -> z
lrwxrwxrwx 1 Unknown+User Unknown+Group 1 Jul 31 08:12 z -> z
--
pwd: /cygdrive/z
$ rm x
rm: remove symbolic link 'x'? yes
rm: cannot remove 'x': Permission denied
vhabhsvoldme@BOS-WSRES186018 /cygdrive/z
$ rm /cygdrive/z/x
rm: remove symbolic link '/cygdrive/z/x'? y
rm: cannot remove '/cygdrive/z/x': Permission denied
--
pwd: /cygdrive/z
/cygdrive/z
$ chown <myaccount> x
chown: cannot dereference 'x': Too many levels of symbolic links
***
因此我陷入困境,无法删除符号链接“x”和“z”。有人能帮我摆脱它吗?谢谢
答案1
感谢 matzeri 解决方案是删除服务器上的链接