【发布时间】:2018-10-24 13:53:53
【问题描述】:
我是 Linux 新手,我有一个名为 stacey 的文件夹。如何从中创建压缩的 tarball?
我可以使用tar -cvzf stacey.tar * 压缩文件夹。但是我可以在添加 7zip 的同时添加一个名为 stacey.tar.gz 的压缩 tarball 吗?
【问题讨论】:
-
感谢您的
-z,它已经被 gzip 压缩了。您可以使用file stacey.tar验证这一点,然后只需将其重命名以添加缺少的扩展名 -
我认为您必须努力避免找到答案。这是您的副本:Compress a folder with tar?、How to compress the directory and its contents、How do I tar a directory of files and folders without including the directory itself?、How to gzip all files in all sub-directories into one compressed file、gzipping up a set of directories and creating a tar compressed file 等。
-
这类问题最好在超级用户上提出,因为它本质上是一个消费者级别的计算问题。它可以在 Ubuntu 或 Unix & Linux 上运行。