Вопрос

I attempted to decrypt an encrypted gpg file using:

gpg -d <encrypted file> --output <outfile>

and just get a message: usage: gpg [options] --decrypt [filename]

In contrast, if I use

gpg -d <encrypted file>

the file is decrypted, but it's written to a default file and displayed to the terminal screen. The former isn't a big issue, but the latter (display in terminal screen while decrypting) is a real nuisance. What, if anything, can be done about it?

Это было полезно?

Решение

Try gpg --output <outfile> -d <encrypted file>

Другие советы

The "-d" is unnecessary, this is fine:

gpg -o plaintext.txt ciphertext.asc

As for printing the decypted data to stdout, that usually only happens when the sender uses the old "for-your-eyes-only" flag. To determine exactly what is happening there, though, I'd need more detail on the version of GPG in use and possibly some information on the ciphertext.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top