尝试删除存储在 Windows 服务器上、安装在 Mac 上的目录

尝试删除存储在 Windows 服务器上、安装在 Mac 上的目录

我正在尝试删除存储在 Windows 2008 R2 服务器上的目录,该目录安装在 Mac 上作为网络主目录 (10.8.5)。该目录由 Safari 创建,用于存储临时 Internet 文件。我需要能够在注销时删除此文件夹以支持缓存重定向

Mac 上的终端显示该目录为空:

36W-FacRm-02:History lwickham$ cd /home/lwickham/Library/Caches/Metadata/Safari/History
36W-FacRm-02:History lwickham$ ls -al
total 0
drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:24 .
drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:28 ..

然而,在 Windows 服务器上,它有一个 0kb 文件,该文件不以“。”开头,但对于 Mac 来说是不可见的。

E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History>dir
 Volume in drive E is FacultyUsers2
 Volume Serial Number is 8C17-4EF3

 Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History

11/08/2013  09:24 AM    <DIR>          .
11/08/2013  09:24 AM    <DIR>          ..
11/07/2013  04:28 PM                 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=6&ved=0CFsQFjAF&url=http%253A%252F%252Fwww.usbanklocat
ions.com%252Fhsbc-bank-usa-96th-street-branch.html&ei=5vR7UtmXEPjfsATe0YCIBA&usg
=AFQjCNF9ypKbpYbXRng00FY3W8Y6cF1Tiw&bvm=bv.56146854,d.
               1 File(s)              0 bytes
               2 Dir(s)  514,231,967,744 bytes free

我尝试从 Mac 中删除该目录的所有尝试都失败了:

36W-FacRm-02:History lwickham$ rm -fr /home/lwickham/Library/Caches/Metadata/Safari/History/*
36W-FacRm-02:History lwickham$ rm -frd /home/lwickham/Library/Caches/
rm: /home/lwickham/Library/Caches//Metadata/Safari/History: Directory not empty
rm: /home/lwickham/Library/Caches//Metadata/Safari: Directory not empty
rm: /home/lwickham/Library/Caches//Metadata: Directory not empty
rm: /home/lwickham/Library/Caches/: Directory not empty

自上次查看以来,已创建了一些新文件。它们似乎以“http/”开头,并显示在 Mac 和 Windows 端。但是,以“http?”开头的文件仍然仅在 Windows 上可见。请注意,Mac 上总共有 6 个文件,Windows 上总共有 7 个文件

Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History

11/11/2013  10:47 AM    <DIR>          .
11/11/2013  10:47 AM    <DIR>          ..
11/11/2013  10:47 AM               202 https?%2F%2Fwww.google.com%2Fsearch?clien
t=safari&rls=en&q=disable+spotlight+launchd&ie=UTF-8&oe=UTF-8.webhistory
11/11/2013  10:46 AM               244 https?%2F%2Fwww.google.com%2Fsearch?clien
t=safari&rls=en&q=how+do+I+do+a+quit+claim+deed+in+new+york+city&ie=UTF-8&oe=UTF
-8.webhistory
11/11/2013  10:47 AM             2,004 http?%2F%2Fwww.cgps.org%2F.webhistory
11/11/2013  10:47 AM               324 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%253A%252F%252Fosxdaily.com%25
2F2011%252F12%252F10%252Fdisable-or-enable-spotlight-in-mac-os-x-lion%252F&ei=H_
yAUpqqM6SxsAT9w4BY&usg=AFQjCNEUPAuccRHkNM7yl0alnETvA2-
11/08/2013  10:48 AM                 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=19&ved=0CJIBEBYwCDgK&url=http%253A%252F%252Fforums.mac
rumors.com%252Fshowthread.php%253Ft%253D664445&ei=mwd9UqTDIsagsQTG-oCoBQ&usg=AFQ
jCNHW7DdAq8pwA9JNvBcruMj-IbV2rA&bvm=bv.56146854,d.cWc.
11/11/2013  10:46 AM               339 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=2&ved=0CFYQFjAB&url=http%253A%252F%252Fwww.nytimes.com
%252F2003%252F06%252F01%252Frealestate%252Fq-a-quit-claim-deed-and-title-insuran
ce.html&ei=zvuAUvOlG8n_4APR6IC4Cg&usg=AFQjCNGLiAdM7qgs
11/07/2013  04:28 PM                 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=6&ved=0CFsQFjAF&url=http%253A%252F%252Fwww.usbanklocat
ions.com%252Fhsbc-bank-usa-96th-street-branch.html&ei=5vR7UtmXEPjfsATe0YCIBA&usg
=AFQjCNF9ypKbpYbXRng00FY3W8Y6cF1Tiw&bvm=bv.56146854,d.
               7 File(s)          3,113 bytes
               2 Dir(s)  516,569,677,824 bytes free



4WN-408-Teacher:~ lwickham$ ls -labi /home/lwickham/Library/Caches/Metadata/Safari/History
total 48
100050239 drwx------  1 lwickham  CGPS\Domain Users   264 Nov 11 10:47 .
100049965 drwx------  1 lwickham  CGPS\Domain Users   264 Nov 11 10:49 ..
100391816 -rwx------  1 lwickham  CGPS\Domain Users  2004 Nov 11 10:47 http:%2F%2Fwww.cgps.org%2F.webhistory
100392984 -rwx------  1 lwickham  CGPS\Domain Users   324 Nov 11 10:47 http:%2F%2Fwww.google.com%2Furl?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%253A%252F%252Fosxdaily.com%252F2011%252F12%252F10%252Fdisable-or-enable-spotlight-in-mac-os-x-lion%252F&ei=H_yAUpqqM6SxsAT9w4BY&usg=AFQjCNEUPAuccRHkNM7yl0alnETvA2-
100392041 -rwx------  1 lwickham  CGPS\Domain Users   339 Nov 11 10:46 http:%2F%2Fwww.google.com%2Furl?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CFYQFjAB&url=http%253A%252F%252Fwww.nytimes.com%252F2003%252F06%252F01%252Frealestate%252Fq-a-quit-claim-deed-and-title-insurance.html&ei=zvuAUvOlG8n_4APR6IC4Cg&usg=AFQjCNGLiAdM7qgs
100392041 -rwx------  1 lwickham  CGPS\Domain Users   339 Nov 11 10:46 http:%2F%2Fwww.google.com%2Furl?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CFYQFjAB&url=http%253A%252F%252Fwww.nytimes.com%252F2003%252F06%252F01%252Frealestate%252Fq-a-quit-claim-deed-and-title-insurance.html&ei=zvuAUvOlG8n_4APR6IC4Cg&usg=AFQjCNGLiAdM7qgs
100392982 -rwx------  1 lwickham  CGPS\Domain Users   202 Nov 11 10:47 https:%2F%2Fwww.google.com%2Fsearch?client=safari&rls=en&q=disable+spotlight+launchd&ie=UTF-8&oe=UTF-8.webhistory
100391867 -rwx------  1 lwickham  CGPS\Domain Users   244 Nov 11 10:46 https:%2F%2Fwww.google.com%2Fsearch?client=safari&rls=en&q=how+do+I+do+a+quit+claim+deed+in+new+york+city&ie=UTF-8&oe=UTF-8.webhistory

答案1

我会回答这个问题。这比较简单:


事实上情况变得更加奇怪:您缺少 2 个文件并且 1 个文件在 Mac 端重复。

查看 Mac 中的 3。www.google.com%2Furl您得到 1xcd=1和 2x cd=2。在 Windows 中,您得到、 和cd=1cd=19还是我遗漏了什么?cd=2cd=6

您还可以查看 inode 编号(这就是我建议的原因-labi)。
您得到了 100392041s.(或者这是一个复制/粘贴错误?)

此外,如果我们查看缺失的 2 个...它们都位于,d文件名末尾附近。(尚不知道它们为什么丢失,但这是一个开始)

这两个文件也是0 字节大小。可以在 Windows 端删除这些吗?

如果 Safari 无法保存带有逗号的缓存文件(就像 Adob​​e 那样这里)可能创建了目录条目,但从未创建文件。那么 NTFS 上的目录中就会有一个“幽灵条目”。

chkdsk您是否在 Windows 端运行过以查看目录条目是否正常?

如果是这种情况,并且您的目录因此而损坏,那么这是 Safari 的错误,如果不修复 NTFS 结构,这些条目就不能被删除。

顺便说一句。看来您的问题只与 Google 的“重定向”链接缓存有关(Google 会扩展其所有搜索链接以跟踪您的点击)。您可以通过安装 Safari 扩展来禁用此行为。请参阅点击此处查看 gDirectLinks。安装后,单击链接时,您将直接进入该网站,而无需 Google 通过其跟踪网站进行重定向。对于您的情况来说,这是一个粗糙的补丁,但也许已经足够了。

答案2

我在装有某些 git 存储库的 USB 驱动器上遇到了这个问题。

sudo rm -rf /path/to/folder/

删除对我有用的目录sudo

相关内容