linux - 如何从目录压缩中输出base64

标签 linux bash zip backup tar

我所在的服务器没有足够的磁盘空间。 我想通过压缩目录来备份所有文件,并仅在 bash 中直接以 base64 输出它。

我试图压缩这个目录,但我的服务器没有足够的磁盘空间。

有没有办法创建 zip(或 tar)存档并实时输出 base64?

最佳答案

好的,我已经用这个命令找到了答案:

zip -r - directory_to_archive/ | base64

来源:Zip file and print to stdout

关于linux - 如何从目录压缩中输出base64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53691294/

相关文章:

linux - 我应该使用 git add before 还是 git commit before

python - 通过 ssh 注销/登录后打开/关闭脚本

linux - 如何在没有键盘的情况下在 bash 脚本中获取文件名

linux - 如何使用 Linux shell 脚本在文件中找到此模式?

Ruby koans 存储库关闭

compression - .zip压缩存档的结构如何?

linux - .htaccess 将 index.php 重定向到/

linux - "rpm -qf file_name"给出了包名称,尽管该文件已被删除

linux - 我遇到错误 "Clearsigned file isn' t 有效,得到 'NOSPLIT'(网络是否需要身份验证?)”

c# - 如何在 C# ASP.NET 中生成 .zip 文件并将其发送给用户?