Google Answers Logo
View Question
 
Q: Deleting Files from OS X Trash ( Answered,   2 Comments )
Question  
Subject: Deleting Files from OS X Trash
Category: Computers > Operating Systems
Asked by: barlow-ga
List Price: $10.00
Posted: 10 May 2003 11:46 PDT
Expires: 09 Jun 2003 11:46 PDT
Question ID: 202042
I'm trying to delete a set of files from a Macintosh with OS X 10.2.6
and I'm getting a response in the terminal that says "HFS+ Private
Data: Operation not permitted." The only web page I can find about
this is in Japanese. Can anyone help me?
Answer  
Subject: Re: Deleting Files from OS X Trash
Answered By: sublime1-ga on 10 May 2003 12:47 PDT
 
barlow...

I'm not a MAC user, however the problem you are having is 
discussed at length in threads at Google's archives of
comp.sys.mac. One successful intervention was to use
the terminal with the command:
sudo rm -rf foldername
...where f specifies ignore premissions.

The author of that suggestion also cautions:
"Just FYI, rmdir only works with empty directories.  For
 blowing away directories with contents, use rm recursively
 as you did above."

"Just be careful, because one mistyping and you would become
 another in a long line of unix-using folk who deleted a
 whole lot more than intended."

The complete thread is here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=argqq5%24lgh%241%40bob.news.rcn.net&rnum=3&prev=/groups%3Fnum%3D50%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26q%3D%2522HFS%252B%2BPrivate%2BData%253A%2BOperation%2Bnot%2Bpermitted.%2522%26sa%3DN%26tab%3Dwg


Another solution, which worked for two users, was to boot
into OS9:

"Yes, it was locked.  However, I was unable to unlock it
 using SetFile. Apparently, the unprintable characters at
 the front of the file name would cause anything I did to
 fail because of "file not found." I tried wild-cards, and
 other tricks and nothing worked except that the folder
 became visible.  So, I booted into OS9 and deleted it from
 there...

 Thanks for the tip!

 Jim"

The complete thread is here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=271020021723554012%25jpbankston%40nospam.mac.com&rnum=1&prev=/groups%3Fq%3D%2522HFS%252B%2BPrivate%2BData:%2BOperation%2Bnot%2Bpermitted.%2522%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26selm%3D271020021723554012%2525jpbankston%2540nospam.mac.com%26rnum%3D1

and:

"OK, then, here's the ultimate (and funny) solution:

 Reboot into OS9. Find the file, put it in the trash,
 and empty the trash. OS9 don't need no steenking
 permissions :-)

 Seriously, if you boot into 9 and the file(s) is/are
 invisible, use File Buddy 7 to scan for invisibles
 and then you can delete them from there."

The complete thread is here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=020920021310393347%25jjt%40NOSPAM.uiuc.edu&rnum=2&prev=/groups%3Fnum%3D50%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26q%3D%2522HFS%252B%2BPrivate%2BData%253A%2BOperation%2Bnot%2Bpermitted.%2522%26sa%3DN%26tab%3Dwg


Please do not rate this answer until you are satisfied that
the answer cannot be improved upon by means of a dialog
established through the "Request for Clarification" process.

sublime1-ga


Searches done, via Google Groups:

"HFS+ Private Data: Operation not permitted."
http://groups.google.com/groups?q=%22HFS%2B+Private+Data%3A+Operation+not+permitted.%22

Clarification of Answer by sublime1-ga on 11 May 2003 19:17 PDT
barlow...

fulldecent-ga makes a good point, which I *assumed* you would
get from the thread that notes:

"I was able to drag Fido out of the trash (into /Volumes/Thor/temp). 
This is an improvement.  I can now empty the trash without getting
errors."
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=020920021310393347%25jjt%40NOSPAM.uiuc.edu&rnum=2&prev=/groups%3Fnum%3D50%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26q%3D%2522HFS%252B%2BPrivate%2BData%253A%2BOperation%2Bnot%2Bpermitted.%2522%26sa%3DN%26tab%3Dwg

It would be wiser to drag the unwanted files to a temp folder
before attempting to delete them with the methods given.

sublime1-ga
Comments  
Subject: Re: Deleting Files from OS X Trash
From: fulldecent-ga on 11 May 2003 18:58 PDT
 
WARNING!!!

Do not manually sudo rm -rf your trash can!

That will delete the can itself and is poor form, the correct way to do this is:

cd $TRASHCAN; sudo rm -rm *

Where $TRASHCAN is the name of your trash.
Subject: Re: Deleting Files from OS X Trash
From: dls_spy-ga on 28 May 2003 19:59 PDT
 
I wrote a script for recursively managing locks if anyone's interested:

http://bleu.west.spy.net/~dustin/projects/applescript/LockScripts.xtp

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy