Search code examples
encryptionterminalgnupg

How to decrypt .gpg file using terminal of mac


Here I've a gpg file and I'm using my mac terminal where I'm using the command

gpg -d /path/to/file/file.zip.gpg -o /path/to/file/abc.zip

to convert the .gpg file. It is shoing me error

usage: gpg [options] --decrypt [filename]

I'm not able to figure it out. Can anyone help me with this?


Solution

  • gpg --decrypt -o '/Path/to/store/decrypted/GPG/file/abc.zip' '/Path/of/GPG/file/file.zip.gpg'
    

    This is the actual command which can solve the issue. Here we have to mention everything before hand the provide locations in the single quotes. This command will go to the GPG file and then decrypt it and move the decrypted version to specified location.