如何在GPG命令中使用密码

发布于 2025-01-29 04:18:03 字数 374 浏览 1 评论 0原文

我是Linux的新手,我正在尝试执行以下操作:

我有一个文件夹,我希望首先压缩焦油,然后用GPG对其进行加密,所有这些都是运行命令时(没有机器的互动GUI )。我现在在互联网上发现的只是GUIS出现并屁股要输入密码,

tar -cvf archive.tar <directory>

gpg -c archive.tar <target-directory>

我一直在阅读GPG命令的选项,但我不明白如何找到相当于7za的内容:

7za a -p <my-password>

这就是我只想插入的内容密码作为命令的一部分。

你有指针吗? 谢谢

I am new to linux and I am trying to do the following:

I have a folder, that I want first to compress in a tar then to encrypt it with gpg and all of this is while running a command (no interactive GUI with the machine). All I find now in the internet are GUIs that show up and ass you to type the password

tar -cvf archive.tar <directory>

gpg -c archive.tar <target-directory>

I keep reading the options of the gpg command but i don't understand how to find the equivalent of 7za :

7za a -p <my-password>

this is what I want only to insert the password as part of the command.

Do you have any pointers?
thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文