我通过自制程序在 Macbook Air (OS X 10.10.5) 上安装了 Pigz,以获得更好的压缩/解压缩性能。
为了压缩,我用了tar --use-compress-program=pigz -cf test.tgz test,没问题。
但解压命令,tar --use-compress-program=pigz -xf test.tgz输出错误:
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
或者有时输出:
tar: Unrecognized archive format
pigz: abort: write error on <stdout> (Broken pipe)
tar: Child process exited with status 32
tar: Error exit delayed from previous errors.
我阅读了tar 的手册,但不知道为什么它不起作用。
我注意到甚至tar --use-compress-program=gzip -xf test.tgz会产生相同的错误。那么这是 OSX 的 tar 实现的一个错误吗?
注意:我知道管道样式pigz -d test.tgz | tar -xf …