.Trashes, .fseventsd, and .Spotlight-V100

Date: 2-Dec-2009/17:51

Tags: ,

Characters: (none)

UPDATE 4-Feb-2013 This article has turned out to be one of the most frequently hit pages on my website. So I rewrote it to try and better help those searching for the keywords. If you are opposed to the idea that bloggers rewrite history to respond to Google Analytics data, here's the Internet Archive version of the original.
If you're reading this, you have probably found some USB stick or external drive with files named .Trashes, .fseventsd, .Spotlight-V100 (and possibly even the more rarely reported ._.Trashes) on it. You might also be annoyed to see files in various directories called .DS_Store. Right?
Odds are, you probably plugged that drive into a Mac at some point. While it had the opportunity, OS/X decided to throw a party on your drive. It grabbed some chunks of disk space for itself, which it uses to make the experience of using OS/X with that drive more streamlined. But if you never plug the disk into an Apple computer again, the space it chewed up will not be reclaimed.

Short Version: What To Do

I only know one method to prevent OS/X from doing this to a specific disk. Ironically, that involves putting some of your own weird (but tiny) files on the disk before you plug it into an OS/X machine:
The contents of these files don't matter, so you can make them empty files using touch. Even better, you could make it a text file with a link to this post, so that you (or someone else) wandering across the files will know what they're for.
I don't know of any way to prevent OS/X from creating .DS_Store files, which track some preferences in each directory you open with the Finder. There is an option to disable it on "Network Drives" by going to a Terminal Window and typing:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
But that won't help you with a USB external HD or an SD card. All the options I know of are basically things which clean up the files in the background or after-the-fact.
There is a free open-source utility that commenter André pointed out, called "Eject for Windows" (which should probably be called "Eject To Windows"). This doesn't prevent OS/X from making the indexes. But if you use it instead of the standard eject it will scrub out all the index files first (including .DS_Store.)
If you want to go the non-free route, there is a program called Blue Harvest which can monitor your disks and has options to (for example) keep non-Mac Filesystems free of the pesky files. I have not used this, but people speak well of it.

Long Version: The Technical Details

The first thing to know—if you do not already—is that when the name of a file or directory starts with a period, that's a "convention" meaning "hide this file from normal view". This convention is understood by programs like the OS/X Finder or standard UNIX shells.
By contrast, Windows filesystems have a separate "hidden" attribute that has nothing to do with the filename. It's a meta-data attribute like whether a file is read only. So files starting with a dot show up on Windows just like any other.
Note If the idea of there being files on your disk you aren't seeing bothers you, it's possible to "take the blinders off" and really "see everything". For instance, on OS/X this article from osxdaily explains how to show the hidden files. I turn this on, but it is probably distracting for most people.
These files are invisible because Apple doesn't think you need to know they are there. Yet what are the benefits of each of these files?

So what do I think

In my original article from 2009 I said:
Apple's choice to do this is incredibly self-serving and shameful. At bare minimum, hidden files and features like these should be off by default for any non-mac-only filesystem formats. They should only be enabled when the user has been made aware of them.
Some commenters disagreed, and said that there is no empirical "right" answer. In their view, the details of understanding what it takes to index a drive or manage the Trash is something their average customer doesn't care to learn. For them, Apple's job is to watch out for their ecosystem and to make a "turnkey" experience that suits the people paying them money. Those who disagree supposedly can take their money elsewhere.
But I'm going to stick to my guns, here. I could quickly design a simple indexing interface which let you pick—for any connected drives you've ever connected with—where to store indexes for them, or not at all. It would be out of character for Apple to put the user in control of the device instead of the device in control of the user. But this is just one more way in which they could have gotten it right instead of wrong.
It's simply not "polite" to write to an external drive—especially of a non-Apple filesystem—without involving the user in the decision. Besides being impolite, it can be destructive: as commenter David points out, you may be in a situation where you know your disk is bad, and want to get as much data off of it as possible. Writing to it could completely hose a data recovery operation!
Microsoft (and even some Linux desktop managers) are copying these bad practices, and getting in the habit of writing invisible junk in places they did not ask about. Hopefully users will push back; demanding to be given more options, and more control. We've gotten to a point where the role technology plays in our lives is too integral to keep letting that control slip away, one "harmless" feature at a time.

Please subscribe to the Feed Icon Atom 1.0 Feed or use Feedburner Icon Feedburner to receive updates as they are posted!!

comments powered by Disqus