How do I keep Mac OS X from saving hidden files on my flash drive?

Hidden files and folders like .fseventsd, .Spotlight-V100, .TemporaryItems, and .Trashes are getting dumped in my flash drive every time I plug it into my Mac...

How do I keep it from doing this?

Related to How to disable creating .Spotlight-V100 and .Trash folders on external drive? and Prevent MacOS from making .* and ._* files!


Solution 1:

Macworld has an article describing a way to delete the hidden Mac dot files. The hints suggest modifying the default unmount script. Use care because the script could delete other hidden files like .bashrc that you may want.

http://hints.macworld.com/article.php?story=20110204124029798