运行 macos11 并拥有一台旧的 WD MyBook NAS,我正在尝试清除一些非常旧的内容(例如 Library/Mail/ 文件夹的旧备份)。这些文件夹中有很多文件/文件夹。我很难强制删除父文件夹及其中的所有内容。
即使我在终端尝试这个
Yes | rm -rf /path/to/folder
我仍然收到错误,例如:
Directory not empty
No such file or directory
我是否可以使用另一个命令来删除该文件夹?
编辑:
如果我运行ls -ld
一些出现错误的文件,我会得到:
ls -ld '/Volumes/Public/backup_mail/Mail/Mail Lost+Found/Mailboxes/*Solisitated Mail.mbox'
drwxrwxr-x 1 [user] staff 264 15 Sep 21:48 /Volumes/Public/backup_mail/Mail/Mail Lost+Found/Mailboxes/*Solisitated Mail.mbox
ls -ld '/Volumes/Public/backup_mail/Mail/V2/Mailboxes/technology.mbox/tv.mbox/8EB56E50-58FF-45AF-A16F-FCAAACB943C9/Data/5'
drwxrwxr-x 1 [user] staff 264 26 Sep 20:35 /Volumes/Public/backup_mail/Mail/V2/Mailboxes/technology.mbox/tv.mbox/8EB56E50-58FF-45AF-A16F-FCAAACB943C9/Data/5
ls -ld '/Volumes/Public/backup_mail/Mail/V2/IMAP-[email address]@[imap server]/[Gmail].mbox/All Mail.mbox'
drwxrwxr-x 1 [user] staff 264 26 Sep 20:35 /Volumes/Public/backup_mail/Mail/V2/IMAP-[email address]@[imap server]/[Gmail].mbox/All
ls -ld '/Volumes/Public/backup_mail/Mail/V2/x'
drwxrwxr-x 1 [user] staff 264 15 Sep 22:00 /Volumes/Public/backup_mail/Mail/V2/x
如果我在上面的父母上运行它,我会得到
drwxrwxr-x 1 [user] staff 568 26 Sep 20:34 /Volumes/Public/backup_mail/Mail/Mail Lost+Found/Mailboxes
drwxrwxr-x 1 [user] staff 264 27 Sep 20:10 /Volumes/Public/backup_mail/Mail/V2/IMAP-[email]@[server]/[Gmail].mbox
drwxrwxr-x 1 [user] staff 264 26 Sep 20:35 /Volumes/Public/backup_mail/Mail/V2/Mailboxes/technology.mbox/tv.mbox/8EB56E50-58FF-45AF-A16F-FCAAACB943C9/Data
drwxrwxr-x 1 [user] staff 568 16 Sep 18:54 /Volumes/Public/backup_mail/Mail/V2
列出的用户是我用来连接 NAS 的用户名,而不是 mac 上的管理员帐户的用户。