分割tar.bz2文件并分别提取每个文件 [英] Split tar.bz2 file and extract each individually
问题描述
我可以将一个较大的tar.bz2文件拆分为几个较小的文件,然后在Ubuntu中分别提取这些较小的tar.bz2文件吗?
谢谢
我认为这不太容易. .tar.bz2
是单个流,它没有像 zip
这样的索引,该索引不允许跳至存档中特定文件的开头.您可以使用 split
实用程序拆分文件,然后使用 cat
拆分零件并将其提取(可以通过stdin进行操作,以避免在磁盘上重新创建粘贴的文件).可以单独提取第一个片段(最后一个文件可能会被损坏,但最后一个文件除外),但是如果没有前面的片段,则其他片段将不可用.
Can I split a large tar.bz2 file into several smaller files and extract those small tar.bz2 files individually in Ubuntu?
Thanks,
I don't think it's easily possible. A .tar.bz2
is a single stream, it doesn't have an index like zip
that would allow skipping to the start of a particular file within the archive. You can split the file using split
utility, and than cat
the parts and extract them (you can do this via stdin to avoid re-creating the pasted file on disk). The first fragment will be possible to extract separately (except for the last file in it which will probably be damaged), but further fragments will not be usable without the onces that come before them.
这篇关于分割tar.bz2文件并分别提取每个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!