
假設我已經設定或定義了一個或多個金鑰組。我該如何列出這些組?我如何決定哪些鍵是這些組的成員?
答案1
gpg --with-colons --list-config group
--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