我意外地将 ~/Downloads 添加到了 Dropbox,那么 ~/Downloads 的符号链接无法删除吗?

我意外地将 ~/Downloads 添加到了 Dropbox,那么 ~/Downloads 的符号链接无法删除吗?

正如标题所说,我不小心将 ~/Downloads 添加到 Dropbox,然后我认为 Dropbox 将 ~/Downloads 文件夹符号链接到相应的 Dropbox 文件夹。

❯ ls -l
total 648
drwx------@   5 anthony  staff     160 May 18 20:09 Applications
drwx------@ 143 anthony  staff    4576 May 17 23:42 Desktop
drwx------@  16 anthony  staff     512 May 10 22:57 Documents
lrwx------+   1 anthony  staff      67 Sep 25  2020 Downloads -> /Users/anthony/Dropbox/My Mac (Yuchens-MacBook-Pro.local)/Downloads

现在我不再需要 Dropbox,我已经从我的机器上完全删除了 Dropbox,包括它的点文件夹。但是,我仍然无法删除它留下的符号链接。

我试过:

~ ·············································································
❯ rm -rf Downloads
rm: Downloads: Operation not permitted

~ ·············································································
❯ sudo !!
Alias tip: _ !!
Password:
rm: Downloads: No such file or directory

~ ·········································································· 6s
❯ unlink Downloads
unlink: Downloads: Operation not permitted

~ ·············································································
❯ sudo !!
Alias tip: _ !!
unlink: Downloads: No such file or directory
# macos version
❯ sw_vers
ProductName:    macOS
ProductVersion: 11.3.1
BuildVersion:   20E241

我该如何删除它?它对我来说非常烦人。非常感谢。

答案1

我确实明白了……

原因是下载文件夹被“锁定”。您可以通过 macOS GUI 中的“获取信息”查看是否被锁定。

ls -l表示用户权限已lrwx------+被锁定。

一旦解锁,特权将恢复drwx------+正常。

相关内容