2015-10-26 11:55:32 +00:00
|
|
|
# mdfind
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> List files matching a given query.
|
2024-01-31 10:20:27 +00:00
|
|
|
> More information: <https://keith.github.io/xcode-man-pages/mdfind.1.html>.
|
2015-10-26 11:55:32 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Find a file by its name:
|
2015-10-26 11:55:32 +00:00
|
|
|
|
2015-12-06 23:01:50 +00:00
|
|
|
`mdfind -name {{file}}`
|
2015-10-26 11:55:32 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Find a file by its content:
|
2015-10-26 11:55:32 +00:00
|
|
|
|
2022-02-14 11:21:43 +00:00
|
|
|
`mdfind "{{query}}"`
|
2015-10-26 11:55:32 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Find a file containing a string, in a given directory:
|
2015-10-26 11:55:32 +00:00
|
|
|
|
2022-02-14 11:21:43 +00:00
|
|
|
`mdfind -onlyin {{directory}} "{{query}}"`
|