Deleted objects suddenly not going into Trash.

Discussion in 'Mac Basics and Help' started by dogbone, Jan 30, 2007.

  1. dogbone macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #1
    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.
     
  2. WildPalms macrumors 6502a

    WildPalms

    Joined:
    Jan 4, 2006
    Location:
    Honolulu, HI
    #2
  3. oceanmonster macrumors regular

    Joined:
    Jan 15, 2007
    #3
    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
     
  4. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #4
    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?
     
  5. WildPalms macrumors 6502a

    WildPalms

    Joined:
    Jan 4, 2006
    Location:
    Honolulu, HI
    #5
    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.
     
  6. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #6
    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>
     
  7. WildPalms macrumors 6502a

    WildPalms

    Joined:
    Jan 4, 2006
    Location:
    Honolulu, HI
    #7
    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. ;)
     
  8. hopejr macrumors 6502

    Joined:
    Nov 10, 2005
    Location:
    New South Wales, Australia
    #8
    Probably should've typed:
    Code:
    sudo rm -R ~/.trash/*
    That will delete everything in the directory, but not the directory itself.
     
  9. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #9
    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.
     
  10. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #10
    It's just a good thing you didn't manage to delete all your files on your system.

    Be careful.
     
  11. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #11
    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. :)
     

Share This Page