Roe*_*oel 5 macos bash terminal spotlight
我应该使用哪个命令将评论(来自文件或剪贴板)添加到 macOS 中文件(任何文件)的“评论”部分?
这些注释用于 Spotlight 索引,显然可以从 Finder (?+i) 手动添加,但出于我的目的,我希望能够从命令行添加(在 Bash 脚本中使用)。
The*_*ius 3
我发现了一个在 macOS 10.13 中适合我的好片段:
osascript -e 'on run {f, c}' -e 'tell app "Finder" to set comment of (POSIX file f as alias) to c' -e end "/path/to/your.file" "hello world"
归档时间:
8 年,6 月 前
查看次数:
1300 次
最近记录:
5 年,8 月 前