我如何列出 GPG 的密钥组?

我如何列出 GPG 的密钥组?

假设我已设置或定义了一个或多个密钥组。如何列出这些组?如何确定哪些密钥属于这些组?

答案1

gpg --with-colons --list-config group

使用 GNU 隐私卫士:GPG 深奥选项

--list-config

显示 GnuPG 的各种内部配置参数。此选项适用于调用 GnuPG 执行任务的外部程序,因此通常无用。doc/DETAILS有关可能列出哪些配置项的详细信息,请参阅源发行版中的文件。--list-config只能与--with-colonsset 一起使用。

doc/DETAILS文件中GPG 1.4.22 的来源

Format of the "--list-config" output
====================================

--list-config outputs information about the GnuPG configuration for
the benefit of frontends or other programs that call GnuPG.  There are
several list-config items, all colon delimited like the rest of the
--with-colons output.  The first field is always "cfg" to indicate
configuration information.  The second field is one of (with
examples):

...

group: the third field contains the name of the group, and the fourth
       field contains the values that the group expands to, separated
       by semicolons.

For example, a group of:
   group mynames = paige 0x12345678 joe patti

would result in:
   cfg:group:mynames:patti;joe;0x12345678;paige

相关内容