I try to use mdfind to find files from a part (substring) of their filename which can be also a number.
For example, I have a file called 'GCph_WL_FoM_154.46_AND_SIMPLE_SUM_GCsp_XC_AVEC_NO-ZCUT_FoM_571.35.py
'.
If I do :
mdfind '154.46'
or
mdfind -name '154.46'
or
mdfind 'kMDItemFSName == "154.46"'
There are not results for these different commands.
I would like to find all the files whose filenames (with or without extension) contains a substring as argument and without case sensitive, and mostly, working also with number for the substring (number could also be located at the end of filename).
Could anyone tell me how could I achieve this ?
UPDATE 1 : I have followed the procedure of reindexing posted on this link.
1) How can I identify the processes launched by the terminal command :
$ sudo mdutil -i on "/Volumes/Macintosh HD"
Moreover, unlike to what is indicated on this link, I didn't find .Spotlight-V100
file into "/Volumes/Macintosh HD"
directory. I found it into /System/Volumes/Data/
directory : is it normal ? (I am on Catalina 10.15.3). I have deleted it.
2) Still about this reindexing, is there a way to get a progression bar, graphically or directly inside terminal. Indeed, I remind that I have a 2TB
SSD disk and it seems it takes a very long time to reindex all the "/Volume/Macintosh HD"
. That's why I would like to get this progression bar.
touch GCph_WL_FoM_154.46_AND_SIMPLE_SUM_GCsp_XC_AVEC_NO-ZCUT_FoM_571.35.py
and then tried bothmdfind '154.46
andmdfind -name '154.46'
, it found it. I then moved the file to/Users/Shared/
and ran bothmdfind
commands and it was found. Assuming it's stored on an indexed volume/location it should find it. I'd try rebuilding the index.Volume
intoSystem Preferences / Spotlight
. The process of rebuild seems not to run :ps aux | grep -i spotlight
gives :_spotlight 48545 0.0 0.0 4806584 7684 ?? S 11:04PM 0:00.05 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared
_spotlight 48544 0.0 0.0 4813752 7804 ?? S 11:04PM 0:00.05 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared
_spotlight 48543 0.0 0.0 4832184 7832 ?? S 11:04PM 0:00.06 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared _spotlight 48542 0.0 0.0 4701112 7824 ?? S 11:04PM 0:00.06 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared
S
mean Sleeping process ? So inactive process, doesn't it ?