How to remove invisible folder from trash?

Discussion in 'Mac Basics and Help' started by npriess, Sep 21, 2009.

  1. npriess macrumors regular

    Joined:
    Nov 12, 2008
    Location:
    Denmark
    #1
    Hi,

    I recently moved a hidden folder (starts with .) to the trash. However, I am unable to press the 'empty' button.
    My question is, of course, how do I delete or restore my hidden folder?
     
  2. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #2
    To force empty the trash, open a Terminal window and run:

    sudo rm -rf /.Trashes ~/.Trash

    (It's a good idea to copy and paste this particular command into the Terminal window to guard against typos. Mistyped, this can be a rather dangerous command.)
     
  3. ss957916 macrumors 6502a

    Joined:
    Jun 17, 2009
    #3
    Or hold down option as you empty - a little easier.
     
  4. npriess thread starter macrumors regular

    Joined:
    Nov 12, 2008
    Location:
    Denmark
    #4
    After running this command in Terminal, when I try to delete any file, it is not moved to trash but deleted immediately:confused:
     
  5. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #5
    Okay, that's a bit odd. Try running:

    mkdir /.Trashes
    sudo chown root:staff /.Trashes
    mkdir ~/.Trash
     
  6. npriess thread starter macrumors regular

    Joined:
    Nov 12, 2008
    Location:
    Denmark
    #6
    then I get the following 'reply:

    mkdir: /.Trashes: File exists
     
  7. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #7
    That's not a problem. *nix usually doesn't give feedback unless there was an error, so if it went to the next line that means it worked. Even if the first one fails, you can run all three because they're more or less independent.

    Does the trash work now?
     
  8. npriess thread starter macrumors regular

    Joined:
    Nov 12, 2008
    Location:
    Denmark
    #8
    The trash still doesn't work. Regarding the terminal, when I run multiple line commands, should I take one at a time or just copy-paste the whole thing at once?
     
  9. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #9
    Run one at a time. Normally you can copy and paste a whole series of commands at once, but I just tried it out and it looks like the sudo on the second line is preventing that trick from working.

    If it still doesn't work, try relaunching Finder by control+option+clicking on the Finder icon in your Dock and selecting Relaunch. If it still doesn't work, try restarting the computer.
     
  10. N10248 macrumors 6502a

    N10248

    Joined:
    Jun 11, 2004
    Location:
    Essex, U.K.
    #10
    i just tried to recreate the problem and solved it...

    1 - find an app that can see hidden files, Panics FTP App Transmit can do this - download the trial

    2 - in transmit turn on the view hidden files option

    3 - use the app to browse to your home folder

    4 - you'll see a ".Trash" folder, your invisible deleted files will show up in here

    5 - create a new folder on the desktop

    6 - drag the invisible files from the Transmit window to the folder on the desktop

    7 - delete the new folder containing the hidden files
     
  11. npriess thread starter macrumors regular

    Joined:
    Nov 12, 2008
    Location:
    Denmark
    #12
    Finally, after restarting a few times - it is working :) Thanks for the advice :apple:
     

Share This Page