假设我已设置或定义了一个或多个密钥组。如何列出这些组?如何确定哪些密钥属于这些组?
答案1
gpg --with-colons --list-config group
--list-config
显示 GnuPG 的各种内部配置参数。此选项适用于调用 GnuPG 执行任务的外部程序,因此通常无用。
doc/DETAILS
有关可能列出哪些配置项的详细信息,请参阅源发行版中的文件。--list-config
只能与--with-colons
set 一起使用。
从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