Is there a GnuPG command that shows the number of keys on a keyring?
MFPA
expires2012 at rocketmail.com
Thu Jul 26 02:02:07 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi
On Tuesday 24 July 2012 at 11:37:24 AM, in
<mid:87hasxe97f.fsf at vigenere.g10code.de>, Werner Koch wrote:
> In case you want to put this into a HOWTO, you better
> write:
> gpg2 --with-colons --list-keys|grep "^pub:"|wc -l
> As usual this also works with gpg.
And your comment in a post on another thread, saying there's a
grep-like tool on Windows, prompted me to do a little research in that
direction. It seems (at least on Windows XP) a broadly equivalent
command is:-
gpg --with-colons --list-keys|find /c "pub:"
I could not find a way to check the string "pub:" was at the start of
the line, so the figure will be inaccurate as a key count in the event
any user-ids contain that string.
Thanks to everybody who helped me with this question.
- --
Best regards
MFPA mailto:expires2012 at rocketmail.com
Never lean forward to push an invisible object.
-----BEGIN PGP SIGNATURE-----
iQCVAwUBUBCJBaipC46tDG5pAQrZoAQAighoUwaB6m+t/9AOMSgZrUT55UUMHIN6
9pVqIMm1jJIcJJWYhhxBhpAfIaxLFT8l7Tw95NHIsxk+WE4+zgvn3npEActrsLc9
zarOQsIIwporySibafiNTex2amwjIGbGX1MjcXa9/qSlLleHUQJUHrhpGNFX30rs
UQZOPju2Aeg=
=CKCE
-----END PGP SIGNATURE-----
More information about the Gnupg-users
mailing list