1
vote
0answers
26 views

How to switch from Spotlight to Alfred via Terminal?

I installed Alfred through homebrew-cask. I want to disable Spotlight and let Alfred be opened with Cmd+S. The first Terminal-based solution I tried was unloading Spotlight with sudo launchctl unload ...
1
vote
0answers
36 views

Correct Way to Check if Spotlight Has Indexed a Folder's Contents

Okay, so I've written a script that uses mdfind to more quickly match files, however, I need to find the best way to check whether a target directory is indexed or not, so I can fall back to using ...
0
votes
0answers
23 views

Best Way to Add Metadata to a File

Okay, so I have a fairly simple script that uses mdfind to quickly find files matching certain criteria so that I can run some operations on them. However, I don't want to run these operations again ...
2
votes
1answer
104 views

Exclude all .git or .svn folders from Spotlight index

I would like to exclude all the .git and .svn folders on my hardrive from the Spotlight index. I know I can manually add them through the GUI but since they are many of them, and often new ones, it ...
4
votes
3answers
1k views

Disable Spotlight Index on 10.8 on Specific Volumes

To swtich off indexing in Terminal i use: sudo mdutil -a -i off This disables it with the -a swtich across all volumes and the -i off part turns "off" the indexing. If connected to my iMac is the ...
3
votes
1answer
150 views

Spotlight won't find apps after AppStore updates them

This started happening with Type2Phone, an app from Houdah Software. Every time after I would update the app via the AppStore, Spotlight would no longer find the app (I use Spotlight for app ...
6
votes
3answers
785 views

How to add folder to Spotlight “do not index”?

Is there any way to programmatically add a folder to Spotlight's "Privacy" tab? Either through Terminal or Applescript? Often I want to click on an item in Spotlight results in Finder, and have that ...
3
votes
2answers
500 views

Can “mdfind” search for phrases and not just unordered words?

Is there a way to search for an exact phrase using the mdfind utility? For example, I created two text documents titled "test1" and "test2". The contents of "test1" are: I love Apple And the ...
3
votes
3answers
7k views

How do I search all hidden files that are in hidden folders using Terminal?

I need to find some configs buried in some hidden folders and can't recall where they are to navigate to them directly Cmd+Shift+G. I did a sudo find -name Foo* (slow), but none of the returned files ...
0
votes
2answers
394 views

How would I restore Spotlight search to my menu bar? (10.7)

For some inexplicable reason, I decided to delete (not hide) Spotlight from my Mac via a terminal command. I downloaded the 10.7.2 update, hoping it would fix this by redownloading Spotlight, but it ...
4
votes
1answer
485 views

Force Spotlight to index a normally un-indexed folder

Spotlight only indexes a limited number of folders and doesn't index all of the files on your system. This makes sense and for the average user this usually isn't a problem. However, I recently ...
5
votes
1answer
270 views

Why is mdfind only returning my most recently accessed files?

I've imported most of a javascript code base via mdimport (using the packaged SourceCode.mdimporter provided by Xcode) and it succeeds. However, mdfind only ever returns to me at most two results, ...
2
votes
3answers
476 views

Editing iPhoto-specific metadata

Perpetua:2011-01-16 ashley$ mdls IMAG0107.jpg ... kMDItemComment = "Cat with is tongue out." So, here's my question. xattr can be used to modify some ...