Hen*_*son 3 osx ls filesystems stat files
我想获取向我发送特定文件的人的姓名。我尝试了不同类型的file, 和stat,但似乎没有一个能解决我的问题。顺便说一下,我目前正在使用 MacOS。这是我使用 AirDrop 获得的文件示例。
我要的名字用红圈标记。
我们可以mdls从命令行使用来列出元数据。这是你想要的?如果是这样,apropos metadata从命令行使用获取与搜索词元数据相关的软件列表可能很有用。抱歉,我无法将图片中的语言翻译成英文,无法确定该mdls命令是否提供了您想要的内容。
mdls -- lists the metadata attributes for the specified file
SYNOPSIS
mdls [-name attributeName] [-raw [-nullMarker markerString]] file ...
DESCRIPTION
The mdls command prints the values of all the metadata attributes
associated with the files provided as an argument.
The following options are available:
-name Print only the matching metadata attribute value. Can be
used multiple times.
-raw Print raw attribute data in the order that was
requested. Fields will be separated with a
ASCII NUL character, suitable for piping to xargs(1) -0.
-nullMarker Sets a marker string to be used when a requested
attribute is null. Only used in -raw mode.
Default is "(null)".
SEE ALSO
mdfind(1), mdutil(1) xargs(1)
Mac OS X June 3, 2004 Mac OS X
Run Code Online (Sandbox Code Playgroud)