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

jsfullr

macrumors newbie
Original poster
Jul 14, 2009
9
0
so i had needed to force delete a file on my computer that wasnt wanting to be deleted, and so i stupidly ran this command in terminal (thinking it would just force delete the entire trash)

sudo rm -rf ~/.Trash

however afterwards, every time i wanted to delete a file from my computer, it just skips the trash entirely, giving me a pop up message that says, "blahblah" will be deleted immediately, are you sure you want to continue?

heres the site where i got the command from: http://www.thexlab.com/faqs/trash.html

please help, thanks
 
The command did delete the trash - but also deleted the .Trash folder it resided in.

Try (if you haven't already) the suggestions on that page under "Files dragged to the Trash "will be deleted immediately" alert"

Removing the .Trash folder should have caused the Finder to recreate it. To avoid the issue entirely, I'd suggest simply going into the .Trash folder and removing the specific offending file manually - leaving the folder intact.
 
Try this:

open terminal and type the following line:

mkdir ~/.Trash

then type the following on the command line:

chmod 700 ~/.Trash

then type the following command:

ls -ld ~/.Trash and the result should look similar to:

drwx------ 2 your-user-name your-group-name 68 Jul 13 08:28 .Trash

where 'your-group-name' will most likely match the user name. You are mainly checking for the permissions (1st column) and the directory name (last column) to make sure you didn't make any mistakes.

The chmod (short for 'change mode') command sets the permissions so that only your account can read, write, and enter (execute) that directory.
 
sudo rm -rf ~/.Trash

While what you did is not that big a deal, next time you probably want the following command instead...

Code:
sudo rm -rf ~/.Trash/*

This will delete everything inside the trash folder without actually deleting the folder itself.

I'm surprised OSX doesn't just recreate the .Trash folder automatically (does it?), when you try to delete something or login or something.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.