Trashing massive amounts of files

Online now: Google [Bot], Majestic-12 [Bot]
Post Reply
justine Elitist Beer Lover
User avatar
I sorta let my text files get way out of hand, to the tune of 7k of them. The last time i tried to empty large amounts of files (1k), my Mac didn't like it. Those weren't text files, though. This is all text files i want to delete. Is there a quick way to delete them all at once that my Mac won't lock up or anything?


iMac 800 768 RAM OS10.3.9
obvs precoupado
Send private message
Are you having trouble actually emptying the trash, or trouble moving them to the trash?

If the latter, just open the terminal, copy and paste this in, and then hit return:
Code:
rm -rf ~/.Trash/*

justine Elitist Beer Lover
User avatar
ya know what, i can't remember, but i think it was the actual emptying part. I'm gonna have to find the thread that mentions OS 10 has problems emptying large amounts.
obvs precoupado
Send private message
Okay. If emptying was the problem, then the command I posted above is exactly what you need.
justine Elitist Beer Lover
User avatar
This is the original question i had and the response was that OSX has problems emptying large amounts of trash:

I was inspired by an article in the current issue of MA to clean up the crap to make my Mac run better. I decided to start with the trash can. It had almost 1600 items in it. I never saw a progress bar while it was emptying, but i couldn't open the trash either. I would get a pop up saying that i couldn't open it because it was emptying. I waited about 5 minutes and then restarted the Mac. When it restarted, the trash was empty.



My question is, though, if the type of file makes a difference.
obvs precoupado
Send private message
It shouldn't. It seems to if you use the Finder to empty the trash, but the command I used above doesn't use the Finder.
Dan Airman Dan
User avatar
For the record, I just emptied 800,000 files. If you've got Leopard, I can't imagine a problem with file deleting. Same with Tiger. If you do, though, matt's terminal command ought to do the trick.
obvs precoupado
Send private message
Leopard handles different actions a lot better than Tiger. (Hard to believe, eh?)

Tiger would probably be able to do it.

I wouldn't try it with Panther. I probably wouldn't even do it with Tiger.
ukimalefu Rebel? resistance? why not both?
User avatar
What about Option+Empty Trash?

Force the Trash to empty using the Option key

This technique uses a hidden feature of Mac OS X to force the Trash to empty. Perform the following steps in the order specified:

Press and hold the mouse button on the Trash icon in the Dock. The context menu for Trash will display.
Press and hold the Option key.
Select Empty Trash from the context menu for Trash.
Release the Option key.
I don't think Option-Empty does anything to alleviate the problem. It forces deletion of locked files, but I think the issue Justine describes is not related.

I don't know what Apple were thinking when they implemented the Empty Trash command in OS X. As demonstrated by the ancient command line utility "rm", unlinking files is about the simplest operation imaginable. Yet, Apple managed to program themselves completely into a corner when done through the GUI. Quite a feat, really.

,xtG
.tsooJ
justine Elitist Beer Lover
User avatar
Dan wrote:
For the record, I just emptied 800,000 files. If you've got Leopard, I can't imagine a problem with file deleting.


Apparently you didn't see the part where i said i'm using 10.3.9
Conner Of Gallifrey
User avatar
Place the files in your trash, run the command Matt provided - it will work.
ukimalefu Rebel? resistance? why not both?
User avatar
Alien wrote:
I don't think Option-Empty does anything to alleviate the problem. It forces deletion of locked files, but I think the issue Justine describes is not related.


It also doesn't ask you if you want to delete, and doesn't show a progress bar.
Ah, does it? Well, then it might help.

,xtG
.tsooJ
SpacemanSpiff Resident Gimp
User avatar
Command option shift delete is the "Hope you meant to push that" option.

Things are gone. Gone-gone. Do not pass go. Go not collect two hundred dollars, gone.
Lombo Opiofiend
User avatar
What Matt said.
Conner Of Gallifrey
User avatar
SpacemanSpiff wrote:
Command option shift delete is the "Hope you meant to push that" option.

Things are gone. Gone-gone. Do not pass go. Go not collect two hundred dollars, gone.


Unless it does a secure delete (which I'm pretty sure it doesn't), they are probably recoverable.
Yes.

,xtG
.tsooJ
user Stupid cockwomble
User avatar
Remember the good old days when the Finder would empty the Trash on its own whenever it wanted to?
ukimalefu Rebel? resistance? why not both?
User avatar
user wrote:
Remember the good old days when the Finder would empty the Trash on its own whenever it wanted to?


uh... no?
Me neither. Do tell!

,xtG
.tsooJ
Zapski Gaze into my eyes...
User avatar
On an improperly maintained Mac?
WindowsBreakerG5 Defender of the Oxford Comma
User avatar
Conner wrote:
SpacemanSpiff wrote:
Command option shift delete is the "Hope you meant to push that" option.

Things are gone. Gone-gone. Do not pass go. Go not collect two hundred dollars, gone.


Unless it does a secure delete (which I'm pretty sure it doesn't), they are probably recoverable.

It doesn't. That doesn't have a key command
Subsequent topic  /  Preceding topic
Post Reply

Trashing massive amounts of files