1

A simple question : on Linux, updatedb command which is launched a second time seems not to reindex all the hard disk.

On MacOS Catalina (or maybe for previous), it seems that the command sudo /usr/libexec/locate.updatedb reindexes all.

Is there an option for locate.updatedb to only update what's new ?

I thought about doing : sudo /usr/libexec/locate.updatedb -u but I am not sure.

mdfind is a great tool but has got no transparency about its dameons mds : I said this since suddenly on my MacOS, mdfind stopped finding recent files, and it was very frustrating. Moreover, it takes a long time to index all the Volume (several days in my case, 2TB HD).

So I wonder if locate.updatedb command that updates from what is already existing is possible ?

On Linux systems, where updatedb is performed, this command is very quick because the whole database is no reindexed.

I just want not to reindex all the /Volume at each time I launch locate.updatedb on MaOS.

UPDATE 1:

I have killed all mds and processes relaled to mdutil and mdfind. Then, I launched yesteray a :

mdutil -E / :

here what I get when I do a ps aux | grep mds :

$ psu | grep mds root 9607 0.0 0.9 11835260 285804 ?? Ss 9:20PM 2:14.29 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mds_stores root 9606 0.0 0.2 6866808 71984 ?? Ss 9:20PM 5:27.05 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds .

I don't understand why it doesn't return all files which normally should be found : example with mdfind -name README, it only return a partial of the expected result (nothing is displayed into my $HOME).

Moreover, the loop glass on right top indicates that indexing is fully carried out but from my opinion, this is too fast, I have 1.2TB of data of index : is it normal, what do you think about this ?

Any suggestion/explanation is welcome.

1

The updatedb program on macOS is a very different program than the updatedb program on Linux. In contrast to the Linux program, the macOS program does not attempt to reuse existing database data about directories that haven't changed.

There's no option for the macOS program that will make it behave like the Linux program.

13
  • @jksoegarrd So how to control or check the progress of indexing on MacOS with mdfind tool ? I don't know when indexation is finished, it seems to take a lot of time (several days on my 2 TB hard disk), what are exactly the daemons which runs and index ? mdfind is not transparent at all. You will really help me if you can answer to these different questions or some of them. Recently, I lost the main utility of mdfind when recent files created were no more found, and it was very frustrating. – youpilat13 Jun 2 '20 at 14:32
  • Click the "looking glass" icon in the top right corner of your desktop. It will show you indexing status when indexing is in progress. – jksoegaard Jun 2 '20 at 14:33
  • Regarding daemons - the mds daemon is responsible for the functionality - it receives events when files and folders are changed, deleted or added. It spawns mdworker processes which then update the index with those changes. – jksoegaard Jun 2 '20 at 14:34
  • If you feel the indexing process has gone haywire, you can use the following guide to rebuild the index: support.apple.com/en-us/HT201716 – jksoegaard Jun 2 '20 at 14:35
  • I would prefer lauching the reindexing from terminal command line. Is it the following command right on MacOS Catalina : cd / ; mdutil -E / ? I saw it might be necessary ,before, to delete DS_store or V100 files but I didn't find these files on my root /. – youpilat13 Jun 2 '20 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .