Jump to content

find and remove on macosx


whoopi
 Share

5 posts in this topic

Recommended Posts

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.

Link to comment
Share on other sites

Generally speaking, there'll be things you won't be able to do as user, even with administrator privileges.

Become root:

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 Share

×
×
  • Create New...