Thursday, August 30, 2018

Trying to delete a directory stored on a Windows server, mounted on a Mac

I am trying to delete a directory stored on a Windows 2008 R2 server, mounted on a Mac as network home (10.8.5). The directory was created by Safari and stores temporary internet files. I need to be able to delete this folder on logout to support cache redirection.


The Terminal on Mac shows the directory as empty:


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 ..

However, on the Windows server it has a single 0kb file that doesn't start with a "." but yet is invisible to the 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
.
11/08/2013 09:24 AM
..
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

All my attempts to delete the dir from the Mac have failed:


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

Some new files have been created since I last looked. They appear to start with "http/" and show up in both the Mac and Windows side. However, the file that starts with "http?" continues to only be visible on Windows. Notice the total of 6 files on mac and 7 on Windows


Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History
11/11/2013 10:47 AM
.
11/11/2013 10:47 AM
..
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

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...