Help - Search - Members - Calendar
Full Version: find and remove on macosx
InsanelyMac Forum > Discuss and Learn > *nix
whoopi
Hi

I would like to remove the '__MACOSX' folders and their contents from a volume and path '/Volumes/dba/Downloads/'
I thought I have to use

find /Volumes/dba/Downloads -name “__MACOSX” -exec rm -Rvf {} \;

I did try

find . /Volumes/dba/Downloads -name “__MACOSX” -exec rm -Rvf {} \;
find /Volumes/dba/Downloads/ -name “__MACOSX” -exec rm -Rvf {} \;
find /Volumes/dba/Downloads/* -name “__MACOSX” -exec rm -Rvf {} \;

but none are working.

This is working but search for unnecessary volumes.
find . -name "__MACOSX"


What do I wrong?

Thanks for your help.
InorganicMatter
That is folder metadata. It has the thumbnails for Finder embedded in it. If you delete the files, they will be regenerated. Leave them alone.
whoopi
Hi,

Thanks but this is not true!
Those are coming from zip files.
The question is still standing

Someone else
Alessandro17
Generally speaking, there'll be things you won't be able to do as user, even with administrator privileges.
Become root:

CODE
% sudo passwd root
Enter Password:
Changing password for root
New password:
Verify password:


Log out

Now you'll find a new user: "Other"

Write "root" and the root password

Use at your own peril.
whoopi
Hi,

Thanks
I think we going the wrong direction.

If I use the find . -name "__MACOSX" -exec rm.... this works, but searches to many volumes.
Just need the 'find' working using a path.

I also have a script and an automator whats do the job, but now I need also a shell script.

Thanks again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.