- Create a file named
.metadata_never_indexinside a folder.
- Rename folders or files so that they end with
- If you only want to hide files from the GUI, move them to a system folder like
- Move the files to a folder that starts with a period like
~/.fontconfig/. It doesn't remove them from mdfind queries like
mdfind 'kMDItemFSName=*' -onlyin ~/.fontconfig/though.
The .metadata_never_index trick was new to me. Excluding temporary files, or other files that you know you won’t need to search, from Spotlight can really speed things up.
As for Time Machine, I could not find it documented, but it seems to exclude folders with the .nobackup extension. There are also APIs such as CSBackupSetItemExcluded() and NSURLIsExcludedFromBackupKey for excluding items, and you can use tmutil isexcluded to check whether a particular item is excluded.
Update (2017-04-06): Thomas:
I have another one: disable fsevents by creating a “.fseventsd/no_log” file at the root of the volume. Haven’t tested this in a while though.
Stay up-to-date by subscribing to the Comments RSS Feed for this post.