macos - Spotlight (mdfind) 元数据在 macOS BigSur 11.3 更新后更改
问题描述
我将笔记保存在 Emacs org-mode 中,文件以 .org 结尾。我使用 mdfind 对这些文件进行全文搜索,命令如下:
mdfind -only <dir> kind:org <search terms>
我昨天更新了 Big Sur 11.3。在没有得到预期的搜索结果后,我注意到 org 文件的元数据现在将它们标记为“文档”文件。所以我可以使用 kind:doc 进行搜索,但它也可以捕获所有类型的文本文件,以及 html、pdf 等。
新旧文件的元数据示例:
==> mdls 2020-06-27--14-43-20Z--converting_docs_in_epub_format.org | grep -E 'kMDItemKind|kMDItemContentType'
kMDItemContentType = "dyn.ah62d4rv4ge8086xh"
kMDItemContentTypeTree = (
kMDItemKind = "Document"
==> mdls 2020-12-07--17-14-42Z--technology_linuxdesktop.org | grep -E 'kMDItemKind|kMDItemContentType'
kMDItemContentType = "org.orgmode.org"
kMDItemContentTypeTree = (
kMDItemKind = "Org document"
有没有人有任何技巧让 mdfind 开始正确标记这些文件,所以我可以再次使用 kind:org 进行搜索?
解决方案
推荐阅读
- reporting-services - 移动行/列组并将相邻行组放置在同一行上
- javascript - 如何将下拉值传递给状态/获取请求?反应
- reactjs - 如何使用 React 渲染数组?
- dask - Dask aysncio 龙卷风 TimeoutError
- c++ - 如何正确地对 constexpr 函数进行单元测试
- apache - Apache 将一个域动态重定向到另一个域
- delphi - 如何停止 Screen.Cursor 影响窗体上的所有控件?
- javascript - 输出下一季度的日期和数量
- node.js - 对 Node JS 使用 Hummus (PDF) 时出现无效字符“�”
- twitter-bootstrap - 引导模式 CTRL+A 选择页面中的所有文本?