在 windows 中使用 zcat

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5126609/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:17:15  来源:igfitidea点击:

Using zcat in windows

xmlwindowsunixzcat

提问by Bjorkson

I have a big XML file which was splited in unix. I got a readme file saying:

我有一个在 unix 中拆分的大 XML 文件。我有一个自述文件说:

zcat FILE.xml.part1.gz File.xml.part2.gz > File.xml

should connect them into one parsable XML file. The separation is guaranteed to be on a byte boundary, but not an XML stanza boundary.

应该将它们连接到一个可解析的 XML 文件中。分隔保证在字节边界上,而不是在 XML 节边界上。

I work on win7 and need to connect this 2 parts.... I tried WinZip and WinRar and both where unable to handle it (obviously).

我在 win7 上工作,需要连接这两个部分……我尝试了 WinZip 和 WinRar,但两者都无法处理(显然)。

How can i do that?

我怎样才能做到这一点?

Thanks upfront.....

先谢谢了.....

采纳答案by sarnold

If you've got the minwg or cygnus environment installed, you could run cat FILE.xml.part1.gz File.xml.part2.gz > File.xml.gz, and then run that file through WinZip or WinRAR.

如果您已经安装了 minwg 或 cygnus 环境,您可以运行cat FILE.xml.part1.gz File.xml.part2.gz > File.xml.gz,然后通过 WinZip 或 WinRAR 运行该文件。

I think I've heard of the hjsplittool for Windows to split and re-assemble split files. You could use hjsplit, if I'm correct on the tool :), to join the gzipped files and then uncompress the combined file.

我想我听说过hjsplitWindows 拆分和重新组合拆分文件的工具。您可以使用hjsplit,如果我在该工具上正确:),加入 gzip 压缩文件,然后解压缩合并的文件。

回答by Daniel

Unzip the file separately, using 7zip, and paste the results into an editor of your choice.

使用 7zip 单独解压缩文件,然后将结果粘贴到您选择的编辑器中。