如何列出 GPG 的關鍵組?

如何列出 GPG 的關鍵組?

假設我已經設定或定義了一個或多個金鑰組。我該如何列出這些組?我如何決定哪些鍵是這些組的成員?

答案1

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

使用 GNU 隱私保護:GPG 深奧選項:

--list-config

顯示GnuPG的各種內部配置參數。此選項適用於呼叫 GnuPG 來執行任務的外部程序,因此通常沒有用處。doc/DETAILS有關可能列出的配置項目的詳細信息,請參閱來源發行版中的文件。--list-config只能與--with-colons套裝一起使用。

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

相關內容