I am running Yosemite on My MacBook Air.
Spotlight settings are as below:
Even though I have not selected any option, it still shows ".h" files in result. Check below image for reference.
As seen in above image, there is iTunesLibrary.h file in search results.
How to stop Spotlight from indexing those ".h" files? and how to remove those ".h" files from search results?
Best Answer
Did you have Xcode installed at some point? Generally those files (which are related to software development) are only indexed if Xcode is installed and the corresponding "Developer" item in Spotlight preferences is enabled.
In any event, since Developer does not appear in your Spotlight preferences, you can try doing it the manual way, based on steps found here:
Enter the following command and press Return. You will be prompted for an administrator password. Enter the password and press Return.
Open TextEdit.
SOURCE
(in all uppercase like that). Press Return to search.If it finds something that looks like this:
Then change
<true/>
to<false/>
. Save and close the document, quit TextEdit and skip to step 12.<dict>
to</dict>
).<key>orderedItems</key>
. On the next line after that, it should say<array>
. Scroll down until you find</array>
.</dict> </array>
, click to place your cursor right after</dict>
and press Return to put</array>
on its own line. Save and close the document and quit TextEdit.Back in Terminal, enter the following command and press Return. You may be prompted for an administrator password. If so, enter the password and press Return.
Press and hold Option-Command and right-click on the Finder icon on your Dock. Select Relaunch from the menu.