Apple Historian
Join Date: May 2004
|
I want to delete some content in my trash can, but I get a message that says something is in use when it's not. I want to delete it, and I don't care what the system is telling me. How do I "force-delete" what's in my trash?
"We are reviewing some 9,000 recent UNHCR referrals from Syria. We are receiving roughly a thousand new ones each month, and we expect admissions from Syria to surge in 2015 and beyond." - Anne C. Richard, Assistant Secretary, Bureau of Population, Refugees, and Migration |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Type exactly as entered, double-check it, and triple-check it before pressing enter. A typo here could be disastrous:
sudo rm -rf ~/.Trash Alternatively, you could type this (without pressing enter afterwards): sudo rm -rf ...add a space to the end of that, and then drag the offending file into the Terminal window. It'll auto-complete the path for that specific file. Then, press enter and it'll force it to be deleted. If you don't want to play with the Terminal, I do believe there are several utilities on MacUpdate that will force delete the trash for you. The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Apple Historian
Join Date: May 2004
|
The ever helpful Brad has done it again! Thanks man.
|
quote |
BANNED
I am worthless beyond hope. Join Date: Jul 2004
Location: Washington, DC
|
Doesn't it work to option-click the Empty Trash command?
|
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Yes and no.
Holding the option key does two things. 1: It empties the trash without notification. 2: It deletes locked files. Files that are "in use" are treated differently than locked files because any processes accessing them may crash. On very rare occasions, particularly if a program or the whole system hangs or crashes, some files may be left in this "in use" state. The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Antimatter Man
Join Date: May 2004
Location: that interweb thing
|
You can also restart the Mac... usually "in use" flags get reset and Trash can be emptied.
|
quote |
Veteran Member
Join Date: May 2004
Location: Ottawa, ON
|
Quote:
I don't know if I would want to risk Brad's method. Tyyypos are just tooo easy two doo. |
|
quote |
Veteran Member
|
Another way is to choose "Secure Empty Trash".
Just next to "Empty Trash" in the Finder menu. I am not sure why it works but it does... If you look at the purpose of secure empty trash it seems to have nothing to do with getting rid of busy or locked files... But it does. It does mean you don't have to reboot and you don't have to risk typos on scary commands!! 'Remember, measure life by the moments that take your breath away, not by how many breaths you take' Extreme Sports Cafe | ESC's blog | scratt's blog | @thescratt |
quote |
hustlin
Join Date: May 2004
|
Quote:
But if secure empty trash works, that looks like the best way to go. |
|
quote |
Finally broke the seal
Join Date: May 2004
|
i think secure trash emptying is just the OS' way of hiding "sudo rm -fr ~/.Trash/*". and using sudo means "dont fuck with me. i'm root."
|
quote |
Veteran Member
|
I thought the intended purpose of "Secure Empty Trash" was to zero the contents of the space used to store the files...
It seems to take an awfully long time which would suggest it is infact doing that. But it seems that the handy side effect is that it also does the "Don't fuck with me" thing and ignores any kind of file in use, or file locked tags. Probably far to dangerous to have a single click to start it! It would be cool if it had a little saftey cover like the Burn widget in iTunes. Anyway have to dash now.. Off to the Full Moon Party... It's a day's journey from Bangkok... And I want to get there for the warm up... See ya on the flip side... :smokey: 'Remember, measure life by the moments that take your breath away, not by how many breaths you take' Extreme Sports Cafe | ESC's blog | scratt's blog | @thescratt |
quote |
hustlin
Join Date: May 2004
|
it's probably sudo srm, but I don't remember hearing it was doing it under sudo.
|
quote |
Finally broke the seal
Join Date: May 2004
|
Quote:
|
|
quote |
Antimatter Man
Join Date: May 2004
Location: that interweb thing
|
Quote:
At least it was like that near Koh Phangan late last century. |
|
quote |
BANNED
I am worthless beyond hope. Join Date: Jul 2004
Location: Washington, DC
|
Quote:
Yup, that's what "Secure Empty Trash" does -- writes over the data in multiple passes, scrambling it to Department of Defense standards for erased data. The regular "Empty Trash" command just deletes it out of the index, effectively putting a "1" in front of the file. That's why someone can recover files that you "deleted" just by choosing Empty Trash. This was a noteworthy item when Panther came out. I'm surprised that it's not common knowledge by now. |
|
quote |
Antimatter Man
Join Date: May 2004
Location: that interweb thing
|
Quote:
Part of the reason is may be possible to undelete such a file is that no overwrites of the data take place because it is possible that no other process has reclaimed the disk space. If you've had lots of disk activity since your deletion, the odds of recovering any file drop due the chance its space has been reclaimed or overwritten since. OS X (most 'nix) always has multiple processes running, some with hefty Virtual Memory demands. OS X (most 'nix) aggressively reclaim drivespace and 'defrags files under 20MB on the fly'. OS X empty trash (a shell for 'nix rm -rf) has no 'undelete' option. File is toast. The combination of the first two conditions alone dramatically increases the chance a file's data gets overwritten or reclaimed and tend to mean deleted data in 'nix is unrecoverable. As for the 'secure empty trash' being noteworthy in Panther, a similar toolset to actively overwrite DoD3/7/9 times has existed since at least the nineties. Incinerator, Shredder, and various other 3rd party DAs or apps shipped for just such a market. Apple has finally rolled some more security into the default install... same as FileVault and the earlier incarnations of encrypted disk images. But if you really wanted a secure laptop before now, you could have bought the clunky Mac OS 9 version of PGP, too. Apple may have absorbed a technology or integrated one into a more elegant solution. Doubt the overwriting software was proprietary, though in these days of the DMCA who knows. |
|
quote |
hustlin
Join Date: May 2004
|
Quote:
Does anyone know if 'empty trash' is using rm with some flags or is it something totally different? Last edited by autodata : 2004-11-23 at 19:00. |
|
quote |
Posting Rules | Navigation |
|
Thread Tools | |