如何在Mac终端中解密.gpg文件

huangapple go评论51阅读模式
英文:

How to decrypt .gpg file using terminal of mac

问题

我有一个.gpg文件,正在使用我的Mac终端,使用以下命令

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

来解密.gpg文件。它显示了以下错误信息

用法:gpg [选项] --decrypt [文件名]

我无法弄清楚。有人可以帮助我吗?

英文:

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?

答案1

得分: 1

--decrypt位于命令的末尾,如输出所示。

这个命令可能会奏效:

gpg -o /path/to/file/abc.zip -d /path/to/file/file.zip.gpg
英文:

The --decrypt goes to the end of the command as showed in the output.

This command might do the trick :

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

答案2

得分: 0

gpg --decrypt -o '/解密后存储的路径/abc.zip' '/GPG文件的路径/file.zip.gpg'

这是可以解决问题的实际命令。在这里,我们必须事先提到单引号中的所有内容,然后执行此命令将进入GPG文件,然后解密它并将解密后的版本移动到指定的位置。

英文:
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.

huangapple
  • 本文由 发表于 2023年5月24日 17:51:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76322219.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定