1

Context

I cannot seem to be able to get TimeMachine to backup my HD, because a given directory seems to contain corrupted files so that I get this kind of message in the Console:

com.apple.backupd: Indexing a file failed. Returned 1 for: /Users/JohnDoe/This.Folder/this.file

Question

How to request that spotlight indexes one specific folder only?


My purpose is to identify in one shot all the defective files

Ideally I would prefer that the indexing be temporarily and quick (I.e it should not impact the default index) since my purpose is to identify defective files.

  • 2
    Follow the steps in this answer. It will tell you how to add & remove locations from Spotlight's index. See if it helps and post back. – fsb Mar 31 '17 at 13:05
  • Thanks. But I am looking at a command line to index only temporarily one given directory. – chris Apr 1 '17 at 11:54
  • You should probably update your question to state that you're looking for a temporary solution using command line only. The question doesn't indicate that. It will help prevent you from receiving answers that don't meet your needs. – fsb Apr 1 '17 at 12:19
  • You are right. Will do – chris Apr 1 '17 at 12:30
  • Have you tried using mdimport /path/to/target/folder? – user3439894 Apr 1 '17 at 15:01

You must log in to answer this question.

Browse other questions tagged .