mdfind <command>

Finds files matching a given query

Arguments

NameDescription
command

Options

NameDescription
--help,-hShow help for mdfind
-0Prints an ASCII NUL character after each result path
-liveProvide live-updates to the number of files matching the query
-countOutput the total number of matches, instead of the path to the matching items
-onlyin <command>Limit the scope of the search to <dir>
-name <command>Search for matching file names to <filename> only
-reprintReprint results on live update
-s <command>Show contents of smart folder ~/Library/Saved Searches/<folder>.savedSearch
-literalForce the provided query string to be taken as a literal query string, without interpretation
-interpretForce the provided query string to be interpreted as if it had been typed into the Spotlight menu