Question
One simple question : how can I not have a .trashes folder on my usb key when I use it on my Mac ?
Indeed, that folder immediatly receives all content I supposedly delete from my key, which is definitly not what I want since it’s only a 128 MB one.
Answer
Well, the answer is two-fold. The reason you’re getting a .Trashes is because OS X stores the contents of your Trash … on the volume that trash exists on. There’s a good reason for this, too. Let’s say you have a 500GB external drive, and only an 80GB internal, and you decide to trash 250GB of data from your external. Even in a best-case scenario, it couldn’t move all of that data to your internal, and you wouldn’t want to wait forever for that copy, anyway. In fact, even if you did, it’s not smart. It it’s deleted from the external as it’s moved, you run the risk of data loss, which would suck if you change your mind. If it doesn’t delete from the external until afterwards, you’d temporarily use a total of 500GB for what’s really only 250GB. So, OS X stores trash on the volume from which it originates.
So, when you trash something on a volume (say, your keychain), it gets moved into a hidden (to OS X) folder. You can ensure deleted files don’t lay around in .Trashes by simply emptying your trash. Problem solved.
Getting Rid of .Trashes
You can’t, really. OS X is pretty whorish here. Sorry.
Using .Trashes Creatively

Now, if OS X can’t create a .Trashes folder on a volume, it spontaneously deletes files with an appropriate warning. We can use OS X’s whorishness about .Trashes to our advantage. Just create a file (not a folder) called .Trashes on that volume.
sudo rm -rf /Volumes/Fob/.Trashes
touch /Volumes/Fob/.Trashes
...where “Fob” is the name of the thumb drive (or any other drive).
Now, when you trash items on that volume, you’ll get the dialog displayed above that warns you of impending data loss.
I was struggling with copying files over to a SD card and being forced to constantly empty the trash — Tonight even, the timing on this couldn’t have been better!
-jm
You can also immediately delete files (bypassing the Trash) in the Finder by selecting the file and pressing Shift-Command-Delete.
Ray Gun Robot: Tech with Personality
Ray Gun Robot: Tech with Personality
I think that should read Command-Option-Delete for instant deletion. Command-Shift-Delete is “Empty Trash”
Except that cmd-opt-del just puts it in the Trash normally. The other deletes things in the Trash already, as you mention. I’m not aware of a keyboard shortcut that does this.
adam is correct. cmd-opt-del just moves things to the trash on my system, as well.
Whoops! Yep, you’r right; Command-Option-Delete empties the trash. I guess I didn’t read that dialog box well enough… or at all…
Ray Gun Robot: Tech with Personality
Ray Gun Robot: Tech with Personality
Well, there’s obviously no built-in shortcut for immediately deleting something. But this seems to be one of the things ex-Windows users asks for in OS X, of which one of them did at a norwegian mac-forum I help out at. So, to give a working solution, one could combine AppleScript and QuickSilver fu. Just create a short AppleScript which asks the Finder to put the selected items in the trash, and then ask Finder to empty the trash. Bind this to a shortcut in your favourite utility (mine’s obviously Quicksilver). I think I would have preferred adding a warning dialog in the AppleScript as well, but that was not what the Windows-person wanted.
Just create a little AppleScript droplet to call BSD’s rm command via do shell script. No need to involve the Terminal nor Finder.
Jeez I thought Macs were supposed to be simple! It’s ludicrous that a built-in shortcut for deletion doesn’t exist.
you say it is “ludicrous” that there is not a built-in shortcut for deletion??? What the hell!!??
If you want to “trash” something at home, do you immediately incinerate it, or do you put it in the TRASH. Then the trash gets “emptied” later. Duh.
Having an instant delete function is just plain risky. You thought Macs were supposed to be simple? Well, getting something back out of the trash IS simple. Using data recovery software to resurrect something you erased is difficult.
Ludicrous?? hmmfff
Incinerate? It’s called a shredder buddy. Duh.
For immediate deletion, I use the Terminal. The Unix “rm” command immediately removes whatever file (or folder) you give it. And the ability to drag an icon from the Finder to the Terminal makes short work of long paths.
To delete a simple file:
rm [path/to/the/file/filename.ext]To securely delete the file:
rm -P [path/to/the/file/filename.ext]To delete a folder:
rm -fR [path/to/the/folder/foldername/]This is how I do immediate deletes, and it works like a charm.
Opening up a terminal then writing out a command and path is hardly an immediate delete is it! You shouldn’t have to leave the GUI to delete a file.
Post new comment