I have a lot of new files and the CPU is quite busy. When I just add a new file, the command mdfind
won't find it immediately. I have to wait for some time (definitely longer than the time needed to index the file as the file is small.)
Once the file is successfully indexed, then I move the file out of the current directly, mdfind -only .
still find the moved file but the path printed in the output is outside of .
. So the spotlight index is not updated completely.
Is there a way to force the index to be updated immediately as least for certain user specified files and directories? Thanks.