Is there a GnuPG command that shows the number of keys on a keyring?

Mika Suomalainen mika.henrik.mainio at hotmail.com
Wed Jul 25 09:56:41 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 24.07.2012 13:37, Werner Koch wrote:
> On Tue, 24 Jul 2012 10:39, rjh at sixdemonbag.org said:
> 
>>> $ gpg2 --list-keys|grep "^pub"|wc -l
> 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.

There is also

gpg --export -a|gpg --import

but that takes time depending on how many keys there are in keyring.

```
<list of keys etc. here>
gpg: Total number processed: 309
gpg:              unchanged: 309
```

- -- 
Mika Suomalainen

NOTICE! I am on mobile broadband with very limited time, so I cannot
read emails very much.
The best time to contact me is probably weekends when I have better
connectivity with good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Public key: http://mkaysi.github.com/PGP/key.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A  AA65 4DB5 3CFE 82A4 6728
Comment: Why do I (clear)sign emails? http://git.io/6FLzWg
Comment: Please remove PGP lines in replies. http://git.io/nvHrDg
Comment: Charset of this message should be UTF-8.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJQD6a2AAoJEE21PP6CpGcoqZ4P/0MXXKo+uck3fR9f8DukO5fr
Xf1BamQ6bWXWgnjOYbhfh7fOR22EbRdVadJfpFJLToqr0ubMw26x4r6jYPbA5Tg6
Z9ZLWbMzGnZOlzAxQmpNcMiIbnxdy3/hT+mVcHA0f3SrosSDJ76KxVr+R1hxjrsF
bxmZi6uUdgwK7c90Ajp7ncjkbZJ1qImQl76uBiBNgUznXz901MkYwLWF/9cAKzee
U8pIZKT5JTqG5c4LlCPUcX7nznVKcrZD1yuOi5guIZQdw0WGzGzTRdqlvJdYAEsw
pEtlntaXFTTZT7FkTAOePiP3YxfjTCz5y/f1PXXqg1CJKWU+AGjc/YzF44pB0Ugc
oBw7+hJi7dMlNU1+pqB3haZAdkONbYLIM6EU1ifdA3Wbq3LsqinLbB0GRXVsevFZ
MCder2fD5W9jEPQdfkRwvhGh44CLGwRlycN2spn0snsPi1GcDdIasNoZe90ubxNa
pDnhWmxb+osD7pJyBe7JkczP3M3IADMHDDdwlUdq5TD1xu8x6pnXx832+LiTiUOm
YEN1gOoRnHergqeEVBBdXNP7HyS42d7JDj6MN456W187NH5Tyl90ERMKkOXp5bGG
9QzSYg1Z7HA6plzLBpXQUbqZFTbQEHbq5x9LFW48YsdxiKs8eCz5vARu9KDJBGQ3
R7I5+KsHTlCO57RcYpBX
=dROO
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list