mdfind

Run searches against the spotlight database.

Platform support

Please be aware that some queries can only be run against certain platforms. Below is a list of the supported platforms that this query supports. Zercurity will automatically pause queries from running if errors are detected. Running a query against an unsupported platform will result in the following error: no such table: mdfind

  • Mac OSX

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"')