mdfind

Run searches against the spotlight database.

Table schema

Name Type Description
path TEXT Path of the file returned from spotlight
query TEXT The query that was run to find the file

Query examples

select count(*) from mdfind where query = 'kMDItemTextContent == "osquery"';select * from mdfind where query = 'kMDItemDisplayName == "rook.stl"';
select * from mdfind where query in ('kMDItemDisplayName == "rook.stl"', 'kMDItemDisplayName == "video.mp4"')