2019-03-01 03:49:45 +00:00
|
|
|
# mdfind
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 列出与给定查询匹配的文件。
|
2021-11-03 17:09:46 +00:00
|
|
|
> 更多信息:<https://ss64.com/osx/mdfind.html>.
|
2019-03-01 03:49:45 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 按文件名查找文件:
|
2019-03-01 03:49:45 +00:00
|
|
|
|
|
|
|
`mdfind -name {{文件}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 按内容查找文件:
|
2019-03-01 03:49:45 +00:00
|
|
|
|
2024-01-01 09:38:53 +00:00
|
|
|
`mdfind "{{查找的字符串}}"`
|
2019-03-01 03:49:45 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 在给定目录中查找包含字符串的文件:
|
2019-03-01 03:49:45 +00:00
|
|
|
|
2024-01-01 09:38:53 +00:00
|
|
|
`mdfind -onlyin {{目录}} "{{字符串}}"`
|