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

dogbone

macrumors 68020
Original poster
A strange new Trash behaviour has started occuring. I'm not sure if it's related to a Terminal command I used yesterday which was

Code:
sudo rm -R ~/.trash

Which I used to empty the Trash. Anyway what is happening now is that when I select an object and use the Cmd Delete key combo, instead of moving items to the trash like it always did, I am now getting a dialog box telling me that the item will be deleted immediately and then it is deleted without going into the Trash, just as if I used the 'sudo rm -R ~/.trash' command on it.
 
I am guessing that you accidentally enabled delete without trash-can for all items in the terminal when you meant to just immediately delete one thing. Unfortunately i do not know alot of terminal commands just a guess
 
Oh, I see, I didn't mean to delete the trash folder, I thought I was just emptying the trash. I can't remember where I got that command from.

Anyhow, how do I tell where the trash folder is supposed to be so I can recreate it in the right place?
 
Oh, I see, I didn't mean to delete the trash folder, I thought I was just emptying the trash. I can't remember where I got that command from.

Anyhow, how do I tell where the trash folder is supposed to be so I can recreate it in the right place?

Your trash folder, i.e. the trash folder used to hold items deleted but not yet emptied from trash, sits under your home folder.

In Terminal, ensure you are in your home folder root by typing 'cd' then press enter. This should take you to your home directory e.g. ~/ if you are not already there. Then type 'mkdir ~/.trash' - you will need to include the ~/ before the folder name as this will produce a fully qualified pathname. The newly created .trash folder will also inherit your permissions. ~ is actually a system alias for the full path to your home directory which would look like /Users/home/fred if the user is fred.
 
Thanks WildPalms, I'll add that command to my list of Terminal Commands.

I remembered that I had a back up volume so I booted into that to see where the Trash folder was supposed to be, but when I restarted normally everything was working again so I must assume that the .Trash folder was automatically recreated.

<note to self: remember to learn how to use Terminal commands>
 
I found an awesome site with lots of stuff on Terminal in OS X, I'll find it and post it for you. I still reference it regularly. ;)
 
OK, that will be excellent.

Just for the record. I did an experiment and used the rm trash command again then checked that it had reverted to it's previous behaviour bypassing the Trash, which it did.

Then I used the mkdir command and made a .trash folder in my home directory, which it did because when I did it a second time it said that one already existed there.

However that did not restore the correct Trash behaviour. ie items I deleted still bypassed the trash. Although a restart restored everything again.

So I'm still trying to understand what has happened. I know that I did removed the Trash folder and I know I did restore the Trash folder but restoring it wasn't enough to stop the Trash bypassing thing.
 
It's just a good thing you didn't manage to delete all your files on your system.

Be careful.
 
Yeah, thanks for that. I already learned my lesson the hard way when I was deleting system 9 from my HD and accidentally deleted the system folder. But these days I keep a complete bootable clone of my HD up to date. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.