deleted my trash "folder" PLEASE help

Discussion in 'Mac Basics and Help' started by FLY., Jul 30, 2009.

  1. FLY. macrumors newbie

    Joined:
    Jul 30, 2009
    #1
    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
     
  2. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
  3. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #3
    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.
     
  4. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
    #4
    No, I think the tilde means a relative directory? Where is the trash directory located in Mac OSX anyways?
     
  5. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #5
    ~/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).
     
  6. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #6
    now i did the sudo "mkdir /.Trash" and i can now drag things to my trash but i can not empty it
     
  7. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #7
    ^^ Probably the permissions are wrong on it.

    I'm not sure, I'd guess in the root.
     
  8. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
    #8
    Run sudo mkdir ~/.Trash instead. The trash was deleted from the home directory originally, so we should put it back.
     
  9. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #9
    okay when i try "sudo mkdir ~/.Trash" it says "mkdir: /Users/emil********/.Trash: File exists" file excists? should i delete folder again? o_O
     
  10. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #10
    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 ;).
     
  11. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #11
    Backup your files and reinstall your OS. That way you save the risk of further damage.
     
  12. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #12
    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?
     
  13. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
    #13
    It is possible that Mac OSX automatically recreated the trash directory. Try a restart and see if that got everything working again.
     
  14. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #14
    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 ? :,(
     
  15. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
    #15
    what happens if you hold option while emptying the trash?
     
  16. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #16
    it makes sound but no delete still.. files stays in trash, it doesnt even ask me if im sure i wanna empty my trash
     
  17. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
    #17
    Open up disk utility and run verify and repair on your hard drive.
     
  18. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
  19. celticpride678

    Joined:
    Feb 15, 2009
    Location:
    Boston, MA
    #19
    It will repair any errors on your hard drive (if you have any).
     
  20. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #20
    any guide on how to find this, my mac is danish laguage cant seem to find any place to repair?
     
  21. geoffreak macrumors 68020

    geoffreak

    Joined:
    Feb 8, 2008
    #21
    You can change the language to English in the system preferences for the time being so you can find everything.
     
  22. FLY. thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #22
    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
     

Share This Page