Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove the functional .Trashes trash can from memory sticks System
I finally received my USB Flash Memory stick today. What I found annoying is that deleted files stay on the memory stick in its "Trashes" folder if you move them to the trash. As I never have anything solely on the memory stick, I don't need the "Trash" feature of the Finder, but want files to be immediatelly deleted. So I opened the Terminal, and cded to the memory stick, and replaced the ".Trashes" folder with a ".Trashes" file:

% cd /Volumes/USBMEM/
% rm -r .Trashes
% touch .Trashes
and: VoilĂ  ... if I command-delete files on the memory stick, the Finder tells me that the files will be deleted and asks me if I want to continue. Now I don't have to empty my trash to empty my memory stick.
    •    
  • Currently 4.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[77,917 views]  

Remove the functional .Trashes trash can from memory sticks | 10 comments | Create New Account
Click here to return to the 'Remove the functional .Trashes trash can from memory sticks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remove the functional .Trashes trash can from memory sticks
Authored by: GaelicWizard on Jan 29, '04 02:05:23PM

Generally, the idea is that if you want to actually delete something from your drive, then you empty the trash. that's what its for...

---
Pell



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: vindu on Jan 29, '04 02:44:59PM

Come on now. The point of the Trash can is to give you an extra chance to recover files after throwing them out. It's entirely reasonable to want this safety net on the computer itself, but *not* to want these discarded files cluttering up space on a backup memory stick.

Incidentally, I do think Apple should introduce "smart trash", so that users can selectively delete files that are in the trash folder, perhaps by category as well as individually.

cheers
Vin



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: stewby on Jan 29, '04 04:09:52PM

Yes, but is it the general idea that in order to delete something from a removable flash drive, you should have to delete all the files that are in the trash on that machine? What if you are (as often happens to me) using someone else's computer, and want to delete something from the flash drive? Do you delete everything in their trash? Do you move all their trashed files somewhere else, empty the trash, then move them back? Do you open a terminal window (this is what I do, but is more work than pressing "OK" if they don't have terminal handy)?

I for one find this hint very useful.



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: Nogaej on Jan 29, '04 07:12:14PM

Great hint, I have run into this on other's machines and not wanted to delete 700megs+ they had in their trash can. Never know, they might want it.



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: Stereo on Jan 30, '04 02:39:27AM
You don't need this hint to force-empty the trash. Just type sudo rm -rf .Trash

[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: ncollingridge on Jan 30, '04 04:32:38AM

Duh? I can't see anywhere in this thread where anyone says anything about force-emptying the Trash - it's all about how to bypass the trash for a selected volume, such as a memory stick. Personally I absolutely second the view that Apple should provide a simple UI (such as a contextual memory choice) for selectively emptying the Trash for specific chosen drives only.



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: chyna4xena on Jul 02, '07 05:02:27PM
I know it's not exactly what you're after, but with Automator it's easy to create a contextual menu item that deletes only the selected items from the trash, leaving the others intact. It won't automatically keep a volume trashless but it does allow you to manually empty the trash for a specific volume only, by selecting only those files.

[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: makip on Jul 06, '07 03:57:14AM

I'd be interested to know the details of creating this Automator flow for emptying Trash on selected volumes.. thanks.



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: chyna4xena on Jul 08, '07 10:54:13PM

"by selecting only those files"

i.e. it is all done manually, with that linked workflow

I tried re-working it to automatically delete everything from a specific volume, without success. Doing it all in a shell script action, I ran up against permissions issues. I thought I could overcome this using an AppleScript action, the AS "do shell script" command can allow admin rights, and even pops up the password dialog for you. However, even when granting admin rights, permissions errors still occur.



[ Reply to This | # ]
Remove the functional .Trashes trash can from memory sticks
Authored by: auto78900 on Apr 10, '09 10:44:59PM

Its also what the new Conflicker worm uses to infect USB sticks, first on Wondows Pc and then on Apple Macintosh !!!

Once infected on both pc systems ,have fun trying to remove it !!!

The Idea of the conflicker virus is to make your USB unrecognizable to the pc !!



[ Reply to This | # ]