Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DakotaGuy

macrumors 601
Original poster
Jan 14, 2002
4,339
4,084
South Dakota, USA
Okay maybe this has came up before, and if it has I am sorry. I love Jaguar and OSX, but ever since I went away from OS9, there is a weird thing about an item "hanging" up in the trash every now and then and the Finder refuses to empty it. It will say "The operation cannot be completed because "x" item is in use." Now sometimes I just have to make sure an Application using the file is closed and I can understand that, but once in awhile there is nothing I can do, short of booting into OS9 and finding the file and then trashing it. Restarting the Finder, even the computer will not take the file out of use.

I was wondering first off if I am in fact the only person with this problem and second is there any terminal command to force the trash to empty in these circumstances. I just find it so time consuming to have to re-boot into 9 to fix something in X. There has to be another way or I would not want one of the new Macs that boot only into OSX. Thanks.
 
you hafta type ... uh...
rm -fR .Trash

when you're in your home directory. i think that's right-- i can never remember the command for deleting a folder that's not empty. All you need to do is remove the .Trash folder from the command line, and everything in it is gone-- then, when you put something in the trash again, a new .Trash folder is created.

actually, you want might someone to confirm that so you don't do something bad to your system...

:)
pnw
 
Originally posted by paulwhannel
you hafta type ... uh...
rm -fR .Trash

when you're in your home directory. i think that's right-- i can never remember the command for deleting a folder that's not empty. All you need to do is remove the .Trash folder from the command line, and everything in it is gone-- then, when you put something in the trash again, a new .Trash folder is created.

actually, you want might someone to confirm that so you don't do something bad to your system...

:)
pnw

If what Paul said about the new Trash folder being created is correct, then that should work. Personally, I would type "rm -r ~/.Trash/*" (without the quotes). Because of that asterisk at the end, this removes all files in your trash can.

--Fred
 
Originally posted by FredAkbar
If what Paul said about the new Trash folder being created is correct, then that should work. Personally, I would type "rm -r ~/.Trash/*" (without the quotes). Because of that asterisk at the end, this removes all files in your trash can.

--Fred

we're both correct to a point, rm -r does delete everything in the directory, you don't need the -f because it's implied and you don't need the asterisk because of -r...

plus i'm just not big on absolute pathnames :)

pnw
 
Thanks everyone for the help. I tried it and it worked. I also downloaded the "Trash it" program for future problems. Like I said, it does not happen very often, but once in a while and it is nice to know how to fix it. If I could I would get you all a cold beer for the help. (or whatever you prefer!)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.