Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Force Spotlight to reindex a drive System 10.4
Tiger only hintAfter mounting an external FireWire volume onto my desktop, I noticed the Spotlight icon in the right uppermost corner of my screen pulsing. Upon clicking on the icon, it told me that it was indexing the drives.

Following the indexing process' completion, I began using Spotlight to search for content on the drives. To my dismay, many files were missing. This included media, system, and other files and folders. The only way to get Spotlight to show them was to either open or edit each missing file/folder.

After studying resources around the web, I discovered that every volume contains its own Spotlight index (making perfect sense). Through closer inspection, each drive contains a file in its root named .Spotlight-V100. This is that index file.

If this file is removed from the root, and the drive is ejected and mounted, Spotlight will once again index the offending drive, creating a new .Spotlight-V100 file. This was able to fix my missing file/folder hiccup. Enjoy.
    •    
  • Currently 2.50 / 5
  You rated: 4 / 5 (6 votes cast)
 
[126,897 views]  

10.4: Force Spotlight to reindex a drive | 27 comments | Create New Account
Click here to return to the '10.4: Force Spotlight to reindex a drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Force Spotlight to reindex a drive
Authored by: saxphile on Apr 29, '05 10:05:46PM

You can also use the command line app mdutil to do the same thing. Although either way you'd have to know something about running commands in Terminal.

For example: sudo mdutil -E /



[ Reply to This | # ]
Can I force Spotlight to index my server volume(s)?
Authored by: ratzfatz on Apr 30, '05 05:58:49AM

This was in fact the reason why I bought Tiger. Am pretty disappointed not being able to search for content on a server volume. Wouldn't mind to leave one workstation running overnight just for doing the indexing.

Indexing a FW drive is possible though. Great! Concerning speed I believe my gigabit network being somewhat more effective compared against FW 800, let alone FW 400.

Any solution out there?



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: danielj7 on Apr 29, '05 10:32:58PM

You can also do this from the command line with the mdutil command. Launch Terminal and enter:

sudo mdutil -E /

and the index file will be erased and rebuilt. The "/" stands for the boot volume; you can substitute the pathname of any volume here.

Substitute "-s" for "-E" to show if indexing is enabled on the volume, and "-i on" or "-i off" to enable or disable indexing. Note that mdutil must be run as root; hence the sudo.

You can also use mdimport to index a subset of files:

mdimport ~/Documents

would index your Documents folder and

mdimport -r /Library/Spotlight/AppleWorks.mdimporter

would index all AppleWorks files on your computer.

mdimport -L

will list all installed metadata importers.



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: fuzzy_logic on Apr 29, '05 11:53:38PM

For some reason, Spotlight doesn't work on my System Preferences. No matter what I type in, everything dims. Anyone has a solution to this?
Thanks in advance!



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: skunk on Apr 30, '05 10:51:23AM

Thanks for the info on forcing Spotlight to re-index, but it STILL can't find lots of stuff on my hard drive, both folders and files.



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: claviclaws on Apr 30, '05 12:17:01PM

Also useful is the -f flag: I keep all my music on my iPod; Apple (probably in an attempt satisfy the RIAA etc etc etc) hasn't allowed Spotlight to index your iPod's music (although all other files on the iPod are indexed), even when specifying the correct directory. Fortunately the 'force' flag bypasses this inconvenience:

$ sudo mdimport -f /Volumes/your_iPod/iPod_Control/

for indexed music goodness.



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: timstringer on May 01, '05 10:43:25AM

I was having a similar problem where much of my content wasn't showing up through Spotlight. So, I entered the "sudo mdutil -E /" command as suggested. Spotlight immediately when through a reindex process that took approximately an hour to complete. But, once it was done, I discovered that none of my imported mail could be accessed (the messages appear to still be there, but they don't show up under the Mail application).

Any suggestions are most welcome. Thanks!



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: geohar on May 02, '05 05:01:09AM

Try

mdimport ~/Library/Mail/*/*.mbox/Messages

Good luck



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive - just be patient!
Authored by: romulis on Apr 30, '05 03:48:13AM

When I installed tiger yesterday the first thing I wanted to try was spotlight.
First it took about an hour to dig through all my files (80GB - full :-( ) and even then it didn't seem to find everything.

After playing around for a while I noticed that the results I was getting from spotlight got better and better. After about 2 hours it worked beautifully!

Even so, it looks like you need a plugin if you want to look for system files or things like korn shell scripts. (I'll be looking into that today)



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: ylon on Apr 30, '05 06:45:32AM

Has anyone been able to figure out how to get Spotlight indexing to remain on after a reboot on Tiger Server? `sudo mdutil -i on /` will turn indexing on for the system, however it does not remain on after a reboot I've found. I simply want to make Server behave like User, anyone have some insight here?



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: geohar on Apr 30, '05 12:07:08PM

spotlight wouldn't find any of my iTunes tracks nomatter what I did. The same for some word documents. However, they both got indexed when I openned them in the finder (not when I played the tunes in iTunes). So I opened iTunes and minimized it (important or you'll have to leave your mac alone a while) and turned off the sound (you may like it but it's a pretty odd effect). Then ran the command below

find ~/Music -name '*.mp3' -or -name '*m4p' -exec open {} \;

This opens in turns each and every track. Voilla, indexed.

May be worth a try if the mdimport command gives no mileage.



[ Reply to This | # ]
Answer: mdimport path
Authored by: lullabud on Mar 21, '08 04:13:49PM

I've had this problem and it REALLY bugged me because I wrote a spotlight driven music search for my website. TONS of results weren't showing up. The answer turned out to be simple though, and it was `mdimport ~/Music/iTunes/iTunes\ Music`. This does the same thing as your "open" trick, but without having to open every file.

Check `man mdimport` for more syntax stuff.



[ Reply to This | # ]
iPod index?
Authored by: jonasyorg on Apr 30, '05 03:00:32PM

Has anyone found a way to force spotlight to show my music files on my ipod(shuffle in this case)? When I first plug it in it shows them fine for a couple of seconds, but then after it's done indexing it's pretty clear that apple explicitly is removing them! I've been waiting for a long time for spotlight as a way to get my files back off my ipod(20gb) so I can get them onto the shuffle easily, but it looks like apple is still block this.

anyone successfully able to show your files on your shuffle through tricking spotlight somehow?



[ Reply to This | # ]
iPod index?
Authored by: claviclaws on Apr 30, '05 04:43:13PM

See my post above:

sudo mdimport -f /Volumes/your_iPod/iPod_Control/



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: fuzzy_logic on Apr 30, '05 03:34:27PM

I still can't get Spotlight to work with my System Preferences. Like I said earlier, no matter what I type in, everything just dims. Any help would be greatly appreciated!



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: geohar on May 01, '05 11:13:53AM

I get lots of warnings: for example

mdimport ~

gives

005-05-01 16:08:22.879 mdimport[721] Importer using too much memory (105 MB), hit threshold. Last file imported was: <file>

and

Incorrect start/end range ordering; fixing.

quite a bit.

Wonder if that's why the initital indexing didn't quite get everything?



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: lullabud on Mar 21, '08 04:19:03PM

You could always call the mdimport command iteratively, like `find ~ -type f -exec mdimport "{}" \;



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: mankoff on May 07, '05 12:44:21AM

I'm getting the same bug mentioned by others: no highlighting of of sysprefs from the sys pref search box, even after re-indexing with mdutil -E /

---
http://spacebit.dyndns.org



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: johnsawyercjs on May 25, '05 10:27:24PM

For people uncomfortable with using command line, etc., another way to delete a volume's Spotlight index is to open the Spotlight prefpane, and drag the volume to Spotlight's "Privacy" window. The index will be deleted immediately. To get Spotlight to re-index the volume, remove it from the Privacy list.



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: elmimmo on Jun 09, '05 06:50:08PM

If you do that with a folder, Spotlight apparently will not reindex the folder's contents. I tried with ~/Library/Mail/ and after removing it from the privacy list I could not get a single result in Mail when searching in "Entire Message"



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: mark hunte on Jun 13, '05 06:50:29PM

Latest from Apple

Spotlight: How to re-index files and folders
Want to re-index a file or folder—or even an entire volume—for Spotlight (part of Mac OS X 10.4 Tiger)? Just do this:

From the Apple menu, choose System Preferences.
Click Spotlight.
Click the Privacy tab.
Drag a file, a folder, or even an entire volume (your hard drive) to the list.
Remove the item or volume you just added.
Spotlight will re-index the contents of the item you initially dragged to the list

---
mh



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: axman6 on Jul 26, '05 03:00:04AM
Hello everyone, It seems to me that i have arather unique problem with spotlight. like for other people, it doesn't work. so i had a look around on the net and first found the help doc from apple on how to get spotlight to reindex a drive, just drop it in the privacy tab and then remove it. but it didn't show up (and i do know it can take some time for it to appear there so i waited quite some time) but sadly it never showed up. so i looked some more and found out about the command line tools like
mdutil
and
mdimport
. i thought to my self i'd done it, i'd found that answer. so i tried things like
mdutil -E /
which said "
mdutil -E /                         
/:
        Error, no index found for volume.
and
mdimport -f -d 2 /
. looked cool, lots of stuff being put on the screen, but all it was saying was "
mdimport[3591] _MDItemCreateFileSystemObject() failed for XXX
for every single file. now i really don't know what to do. when we first installed tiger it worked fine(ish) for a while and then it stoped working. please give me some suggestions for this, because this is one of the most useful features of tiger and i'd really love it if it worked. if you have a brillient ides, please e-mail me at axman6@gmail.com. Thanks heaps, Al.

[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: axman6 on Jul 26, '05 03:00:20AM
Hello everyone, It seems to me that i have arather unique problem with spotlight. like for other people, it doesn't work. so i had a look around on the net and first found the help doc from apple on how to get spotlight to reindex a drive, just drop it in the privacy tab and then remove it. but it didn't show up (and i do know it can take some time for it to appear there so i waited quite some time) but sadly it never showed up. so i looked some more and found out about the command line tools like
mdutil
and
mdimport
. i thought to my self i'd done it, i'd found that answer. so i tried things like
mdutil -E /
which said "
mdutil -E /                         
/:
        Error, no index found for volume.
and
mdimport -f -d 2 /
. looked cool, lots of stuff being put on the screen, but all it was saying was "
mdimport[3591] _MDItemCreateFileSystemObject() failed for XXX
for every single file. now i really don't know what to do. when we first installed tiger it worked fine(ish) for a while and then it stoped working. please give me some suggestions for this, because this is one of the most useful features of tiger and i'd really love it if it worked. if you have a brilliant ides, please e-mail me at axman6@gmail.com. Thanks heaps, Al.

[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: UberFu on Jan 20, '07 08:38:56PM

THIS WORKS GREAT_ I DRAGGED MY HD OVER TO THE SPOTLIGHT PRIVACY SCREEN - CLOSED OUT OF SPOTLIGHT BACK TO THE MAIN SYS PREFS SCREEN - THEN CLOSED SYS PREFS DOWN_

RELAUNCHED SYS PREFS AND WENT BACK INTO SPOTLIGHT_

DELETED OUT THE HD ICON FROM THE PRIVACY SCREEN AND CLOSED OUT THE SYS PREFS_

FOR A MINUTE I DIND'T THINK THIS DID ANYTHING UNTIL I REALIZED MY SYSTEM SLOWED WAY DOWN_ CHANGING APPS - LOADING WEBPAGES SWITTCHING WINDOWS WITHIN THE SAME APP_



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: jgeraghty on Jul 24, '05 11:35:42PM

I know this thread goes back to april but...
Is it possible to index networked drives. Does the drive need to be mounted (like a mounted NFS share) for spotlight to index it? How depandent on the UFS is spotlight?



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: christefano on Aug 12, '07 05:46:35PM

This will be possible in Leopard, or maybe Leopard Server.



[ Reply to This | # ]
10.4: Force Spotlight to reindex a drive
Authored by: SEFey on Jul 19, '10 09:31:26AM

Who needs command line crap. If you do anything to force Spotlight to re-index the problem is solved. I went to System Prefs>Spotlight and I selected my mail folder to be private. I then restarted my machine. Counterintuitive as it is, my mail messages were searchable. I have since reset the privacy setting back so that no folders are private thinking that it might make future emails private. It is still working to this day.



[ Reply to This | # ]