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

npriess

macrumors regular
Original poster
Nov 12, 2008
101
0
Denmark
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?
 
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.)
 
After running this command in Terminal, when I try to delete any file, it is not moved to trash but deleted immediately:confused:
 
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?
 
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?
 
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.
 
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.