GPG: Show the key ID of key used to encrypt
To show the key ID of the key used to encrypt file.gpg
run:
$ gpg --pinentry-mode cancel --list-packets file.gpg
And to list keys with the key IDs run:
$ gpg -k --keyid-format=long
personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki gpg