Search code examples
gnupg

Writing gpg decrypted file to a specified outfile


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?


Solution

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