Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Spotlight & Finder Not Finding All Files/Folders

Hello,


My Spotlight and Finder searches doesn't find all files/folders on ML 10.8. The files are there if I browse to them manually, and I'm hoping I can fix this without a clean install.


Some things I have tried:

  • I've dragged the entire HDD to the Spotlight Privacy tab and removed it (to re-index).
  • I've checked Spotlight Preferences and everything is checked under Search Results.
  • I've reset the cache with the mdutil commands.
  • I've cleaned the system with OnyX, I've reset the ACL through recovery.
  • Created a new system user - the results are the same.
  • I've called AppleCare and they couldn't resolve it.


This hasn't been an issue until I upgraded to ML. The weird thing is, that every time I reboot the system, Spotlight/Finder will find all my files after logging in to my user account. Then after 2 minutes of being logged in, the same issue occurs again where it will only show some files. This has been bugging me, and I've done my best searching through Google and various discussions without a working resolution. Any ideas? Thanks for any suggestions.

iMac (21.5-inch Mid 2010), OS X Mountain Lion, 8 GB RAM

Posted on Aug 17, 2012 9:32 AM

Reply
32 replies

Aug 18, 2012 6:30 PM in response to Linc Davis

Still cannot locate the file after running mdimport -d2. Here's the output:



Kevin-iMac:~ kevin$ mdimport -d2 /Users/kevin/Desktop/testdoc.txt

(Info) Import: Plaintext import

2012-08-18 18:30:32.808 mdimport[6339:707] Imported '/Users/kevin/Desktop/testdoc.txt' of type 'public.plain-text' with plugIn /System/Library/Spotlight/RichText.mdimporter.

2012-08-18 18:30:32.809 mdimport[6339:707] Attributes: {

":MD:kMDExtendedImportDictionary" = {

};

"_kMDItemFinderLabel" = 0;

"_kMDItemPrescanCandidate" = 1;

"_kMDItemStaticInterestScore" = "0.5";

"_kMDItemTextEncodingHint" = 134217984;

"com_apple_metadata_modtime" = 366944861;

kMDItemContentCreationDate = "2012-08-18 01:07:41 +0000";

kMDItemContentModificationDate = "2012-08-18 01:07:41 +0000";

kMDItemContentType = "public.plain-text";

kMDItemContentTypeTree = (

"public.plain-text",

"public.text",

"public.data",

"public.item",

"public.content"

);

kMDItemDateAdded = "2012-08-19 01:30:16 +0000";

kMDItemDisplayName = {

"" = "testdoc.txt";

};

kMDItemKind = {

"" = NSStringPboardType;

ar = "\U0645\U0633\U062a\U0646\U062f \U0646\U0635\U064a \U0639\U0627\U062f\U064a";

ca = "Document de text normal";

cs = "Prost\U00fd textov\U00fd dokument";

da = "Alm. tekstdokument";

de = "Reines Textdokument";

el = "\U0388\U03b3\U03b3\U03c1\U03b1\U03c6\U03bf \U03b1\U03c0\U03bb\U03bf\U03cd \U03ba\U03b5\U03b9\U03bc\U03ad\U03bd\U03bf\U03c5";

en = "Plain Text Document";

es = "Documento de texto normal";

fi = "Pelkk\U00e4 teksti -dokumentti";

fr = "Document format texte";

he = "\U200f\U05de\U05e1\U05de\U05da \U05de\U05dc\U05dc \U05e4\U05e9\U05d5\U05d8";

hr = "Dokument obi\U010dnog teksta";

hu = "Sima sz\U00f6veges dokumentum";

it = "Documento di solo testo";

ja = "\U6a19\U6e96\U30c6\U30ad\U30b9\U30c8\U66f8\U985e";

ko = "\Uc77c\Ubc18 \Ud14d\Uc2a4\Ud2b8 \Ub3c4\Ud050\Uba58\Ud2b8";

nb = "Dokument med ren tekst";

nl = "Platte-tekstdocument";

pl = "dokument tekstowy (zwyk\U0142y)";

pt = "Documento de Texto Sem Formata\U00e7\U00e3o";

"pt-PT" = "Documento de texto simples";

ro = "Document text simplu";

ru = "\U0414\U043e\U043a\U0443\U043c\U0435\U043d\U0442 \U043f\U0440\U043e\U0441\U0442\U043e\U0433\U043e \U0442\U0435\U043a\U0441\U0442\U0430";

sk = "Dokument s oby\U010dajn\U00fdm textom";

sv = "Rent textdokument";

th = "\U0e40\U0e2d\U0e01\U0e2a\U0e32\U0e23\U0e02\U0e49\U0e2d\U0e04\U0e27\U0e32\U0e21 \U0e41\U0e1a\U0e1a\U0e18\U0e23\U0e23\U0e21\U0e14\U0e32";

tr = "D\U00fcz Metin Belgesi";

uk = "\U0414\U043e\U043a\U0443\U043c\U0435\U043d\U0442 \U043f\U0440\U043e\U0441\U0442\U043e\U0433\U043e \U0442\U0435\U043a\U0441\U0442\U0443";

"zh-Hans" = "\U7eaf\U6587\U672c\U6587\U7a3f";

"zh-Hant" = "\U7d14\U6587\U5b57\U6587\U4ef6";

};

kMDItemLogicalSize = 4;

kMDItemPhysicalSize = 4096;

kMDItemTextContent = test;

}

Kevin-iMac:~ kevin$

Aug 18, 2012 6:46 PM in response to kevinhe

Please read this whole message before doing anything.


This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.


Step 1


The purpose of this step is to determine whether the problem is localized to your user account.


Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”


While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.


Test while logged in as Guest. Same problem(s)?


After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.


*Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.


Step 2


The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.


Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:


  1. Be sure your Mac is shut down.
  2. Press the power button.
  3. Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
  4. Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).


Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.


The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.


*Note: If FileVault is enabled, or if a firmware password is set, you can’t boot in safe mode.


Test while in safe mode. Same problem(s)?


After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

Aug 18, 2012 7:34 PM in response to Linc Davis

Step 1 - Guest account, same problem.


Step 2 - Safe Boot, Spotlight will not find anything at all. (Seems as if the system purposely prevents it from searching while in safe mode, but I'm not sure if that's how it's designed to behave.)


Now I'm logged back into my account on a normal system boot, and I can confirm that after every system reboot, Spotlight and Finder finds all files perfectly. After 2-3 minutes, the problem will persist.

Aug 18, 2012 8:55 PM in response to kevinhe

Please read this whole message before doing anything.


This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.


Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.


These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.


Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects.


Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then either copy or drag it. The headings “Step 1” and so on are not part of the commands.


Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.


Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.


When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.


Step 1


Copy or drag — do not type — the line below into the Terminal window, then press return:


kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'


Post the lines of output (if any) that appear below what you just entered (the text, please, not a screenshot.) You can omit the final line ending in “$”.


Step 2


Repeat with this line:


sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfix|x)/{print $3}'


This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning.


Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step.


Step 3


launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'


Step 4


ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null


Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.


Step 5


osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null


Remember, steps 1-5 are all drag-and-drop or copy-and-paste, whichever you prefer — no typing, except your password. Also remember to post the output.


You can then quit Terminal.

Aug 18, 2012 9:20 PM in response to Linc Davis

Step 1:



com.logmein.driver.LogMeInSoundDriver (1.0.0)



Step 2:



com.agilebits.onepassword-osx-thumbs

com.microsoft.office.licensing.helper

com.logmein.raupdate

com.logmein.logmeinserver

com.google.keystone.daemon

com.adobe.fpsaud



Step 3:



com.agilebits.onepassword-osx-helper

com.logmein.logmeinguiagent

com.logmein.logmeingui

com.google.keystone.system.agent

com.adobe.CS5ServiceManager

ws.agile.1PasswordAgent

com.valvesoftware.steamclean

com.facebook.videochat.kevin.updater

com.adobe.AAM.Scheduler-1.0



Step 4:



/Library/Components:



/Library/Extensions:



/Library/Frameworks:

AEProfiling.framework

AERegistration.framework

Adobe AIR.framework

AudioMixEngine.framework

MacFUSE.framework

NyxAudioAnalysis.framework

OSXFUSE.framework

PluginManager.framework

iLifeFaceRecognition.framework

iLifeKit.framework

iLifePageLayout.framework

iLifeSQLAccess.framework

iLifeSlideshow.framework

iTunesLibrary.framework



/Library/Input Methods:



/Library/Internet Plug-Ins:

.DS_Store

Flash Player.plugin

JavaAppletPlugin.plugin

LogMeIn.plugin

LogMeInSafari32.plugin

LogMeInSafari64.plugin

Quartz Composer.webplugin

QuickTime Plugin.plugin

SharePointBrowserPlugin.plugin

SharePointWebKitPlugin.webplugin

flashplayer.xpt

googletalkbrowserplugin.plugin

iPhotoPhotocast.plugin

npgtpo3dautoplugin.plugin

nsIQTScriptablePlugin.xpt



/Library/Keyboard Layouts:



/Library/LaunchAgents:

com.adobe.AAM.Updater-1.0.plist

com.adobe.CS5ServiceManager.plist

com.google.keystone.agent.plist

com.logmein.logmeingui.plist

com.logmein.logmeinguiagent.plist

com.logmein.logmeinguiagentatlogin.plist



/Library/LaunchDaemons:

com.adobe.SwitchBoard.plist

com.adobe.fpsaud.plist

com.apple.serverd.plist

com.google.keystone.daemon.plist

com.logmein.logmeinserver.plist

com.logmein.raupdate.plist

com.macserve.ppp.l2tp.plist

com.macserve.ppp.pptp.plist

com.microsoft.office.licensing.helper.plist



/Library/PreferencePanes:

Flash Player.prefPane



/Library/PrivilegedHelperTools:

com.microsoft.office.licensing.helper



/Library/QuickLook:

GBQLGenerator.qlgenerator

iBooksAuthor.qlgenerator

iWork.qlgenerator



/Library/QuickTime:

AppleIntermediateCodec.component

AppleMPEG2Codec.component



/Library/ScriptingAdditions:

Adobe Unit Types.osax



/Library/Spotlight:

GBSpotlightImporter.mdimporter

LogicPro.mdimporter

Microsoft Office.mdimporter

iBooksAuthor.mdimporter

iWork.mdimporter



/Library/StartupItems:

DynDNSUpdater



/etc/mach_init.d:



/etc/mach_init_per_login_session.d:



/etc/mach_init_per_user.d:



Library/Address Book Plug-Ins:

.DS_Store

AdiumAddressBookAction_AIM.scpt

AdiumAddressBookAction_ICQ.scpt

AdiumAddressBookAction_Jabber.scpt

AdiumAddressBookAction_MSN.scpt

AdiumAddressBookAction_SMS.scpt

AdiumAddressBookAction_Yahoo.scpt



Library/Fonts:



Library/Input Methods:

.localized



Library/Internet Accounts:

V1



Library/Internet Plug-Ins:

.DS_Store



Library/Keyboard Layouts:



Library/LaunchAgents:

.DS_Store

com.adobe.AAM.Updater-1.0.plist

com.apple.AddressBook.ScheduledSync.PHXCardDAVSource.9FAD86E5-7513-4043-9B41-044 EDA2FA2FF.plist

com.apple.CSConfigDotMacCert-[removed]@me.com-SharedServices.Agent.plist

com.apple.SafariBookmarksSyncer.plist

com.facebook.videochat.kevin.plist

com.valvesoftware.steamclean.plist

ws.agile.1PasswordAgent.plist



Library/PreferencePanes:



Library/ScriptingAdditions:



Step 5:



Steam, Fantastical, iTunes, Tweetbot, Mail, Alfred, Dropbox

Aug 19, 2012 7:32 AM in response to kevinhe

Back up all data to at least two different storage devices, if you haven't already done so. The backups can be made with Time Machine or with a cloning tool such as Disk Utility. Preferably both. You must be certain that you can restore everything to the state it's in now.


Boot into Recovery, launch Disk Utility, and erase the startup volume. This operation will destroy all data on the volume, so you had be better be sure of your backups. Install OS X. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade, so make a note of those before you begin.


When you reboot, you'll be prompted to go through the initial setup process. That’s when you import the data from one of your backups. For a walkthrough, see here:


Using Setup Assistant


Don't import the Guest account, if it was enabled on the old system.


Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with networks that require any kind of authentication other than a WPA or WPA2 Personal password.

Spotlight & Finder Not Finding All Files/Folders

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.