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

FLY.

macrumors newbie
Original poster
Jul 30, 2009
11
0
i had this problem, that i couldn't delete a file from my trash can, so i followed a link i found in a thread where some one had the same problem as i did, in the link i found a guide that said i should go to terminal and enter "sudo rm -rf ~/.Trash" so i did, and yea my trash can was now empty, but then i tried to delete a file by dragin' it into my trash can in the dock, my macbook now tells me that the file will be deleted INSTANT, i search the internet again and found out that my problem was that the command i intered in terminal (sudo rm -rf ~/.Trash) deleted my trash directory

so i guess i now need to REcreate my trash, can anybody PLEASE give me a guide on how to do that im realy lost, + im new to mac
 
what you should have done (probably) is missing a final slash and then it would do what you want.

If you had a ~ in the first command you probably also need one in the second though. i.e. sudo mkdir ~/.Trash.
 
what you should have done (probably) is missing a final slash and then it would do what you want.

If you had a ~ in the first command you probably also need one in the second though. i.e. sudo mkdir ~/.Trash.

No, I think the tilde means a relative directory? Where is the trash directory located in Mac OSX anyways?
 
~/foo means a subdirectory called foo in the home directory.

/foo means a subdirectory called foo in the root directory (Macintosh HD).

foo means a subdirectory called foo in the current directory (when Terminal starts this is the home directory).
 
now i did the sudo "mkdir /.Trash" and i can now drag things to my trash but i can not empty it
 
Run sudo mkdir ~/.Trash instead. The trash was deleted from the home directory originally, so we should put it back.
 
okay when i try "sudo mkdir ~/.Trash" it says "mkdir: /Users/emil********/.Trash: File exists" file excists? should i delete folder again? o_O
 
Do sudo rm -rf /.Trash (to remove the .Trash folder where it shouldn't be) and then do sudo mkdir ~/.Trash as as geoffreak points out you originally deleted from your home directory.

And then if it works don't touch the command line unless you know what you are doing ;).
 
it aint working yet, i did "sudo rm -rf /.Trash" to delete the new, then "sudo mkdir ~/.Trash" to make new, it says after "sudo mkdir ~/.Trash" that folder excist allready, should i reboot between commads?
 
It is possible that Mac OSX automatically recreated the trash directory. Try a restart and see if that got everything working again.
 
restart didnt help me, problem is that "sudo mkdir /.Trash" gave me a trash i can throw things into but no empty, right?, and i can not delete this "sudo mkdir /.Trash" and make a new cus it says file excist"

so i think my problem is pretty critical, i cant delete thing from my mac ? :,(
 
it makes sound but no delete still.. files stays in trash, it doesnt even ask me if im sure i wanna empty my trash
 
any guide on how to find this, my mac is danish laguage cant seem to find any place to repair?
 
You can change the language to English in the system preferences for the time being so you can find everything.
 
while i was waiting for answers i managed to delete my trash folder again i think by "sudo rm -rf ~/.Trash" so i added ~

now i cant dragg anything to it, it dont even delete it instant i guess i now need to create a new trash folder


edit; that i tried; sudo mkdir ~/.Trash, still said file excist, then i rebooted and now things works fine for me, thanks for those of u who took time to try fix my problem
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.