美文网首页
tar 使用pigz多线程打包

tar 使用pigz多线程打包

作者: 9682f4e55d71 | 来源:发表于2017-03-01 16:45 被阅读3326次

安装

yum -y install pigz

压缩

tar cvf - zencart | pigz > zencart.20170301_164100.tar.gz

解压到指定目录

转自: http://unix.stackexchange.com/questions/198958/unpigz-and-untar-to-a-specific-directory

I found three solutions:
With GNU tar, using the awesome -I
 option:
tar -I pigz -xvf /path/to/archive.tar.gz -C /where/to/unpack/it/

With a lot of Linux piping (for those who prefer a more geeky look):
unpigz < /path/to/archive.tar.gz | tar -xvC /where/to/unpack/it/

More portable (to other tar
 implementations):
unpigz < /path/to/archive.tar.gz | (cd /where/to/unpack/it/ && tar xvf -)

(You can also replace tar xvf -
 with pax -r
 to make it [POSIX](https://en.wikipedia.org/wiki/POSIX)-compliant, though not necessarily more portable on Linux-based systems).

Credits go to [@PSkocik](http://unix.stackexchange.com/users/23692/pskocik) for a proper direction, [@Stéphane Chazelas](http://unix.stackexchange.com/users/22565/st%C3%A9phane-chazelas) for the 3rd variant and to the author of [this](http://stackoverflow.com/a/29270282/2202101) answer.

使用tar+pigz+ssh实现大数据的高效传输, 流式压缩传输

http://www.cnblogs.com/chjbbs/p/6472236.html
磁盘读取---->打包---->压缩------>传输---->解压缩-->拆包---->落盘
|->tar |->gzip |->ssh |->gzip |->tar
tar -c test/ |pigz |ssh -c arcfour128 目标IP "gzip -d|tar -xC /data" # 解压
tar -c test/ |pigz |ssh -c arcfour128 目标IP "cat >/data/test.tar.gz" # 不解压

1924687-1d36cbee11b7e255.png

相关文章

  • tar 使用pigz多线程打包

    安装 yum -y install pigz 压缩 tar cvf - zencart | pigz > zenc...

  • pigz打包、解压

    打包 $tar --use-compress-program=pigz -cvpf package.tgz ./p...

  • pigz

    apt-get install pigz 压缩: tar cvf - 目录名 | pigz -9 -p 24 > ...

  • pigz多线程压缩工具&scp断点续传

    1.pigz多线程压缩工具 使用conda安装 多线程压缩 多线程解压 2.scp服务器间传文件及断点续传 服务器...

  • linux文件的压缩和解压

    tar 打包(文件或目录)命令 通常使用-cvf作为tar命令打包的常见写法,该命令在使用时也可以不加-作为选项前...

  • 多线程压缩工具pigz使用

    参考多线程压缩工具Pigz使用 学习Linux系统时都会学习这么几个压缩工具:gzip、bzip2、zip、xz,...

  • linux中强大的Tar压缩与解压缩

    tar打包 打包: tar -cvf xxx.tar yyyxxx.tar: 是打包后的文件名yyy: 是要打包的...

  • linux 解压

    摘自 .tar (注:tar是打包,不是压缩!) 解包: tar xvf FileName.tar 打包: tar...

  • 5.linux常用指令3

    tar :打包(归档) 打包文件后缀为 .tar 格式:tar [option] filename Option ...

  • Linux文件压缩解压:gzip

    09.文件压缩解压:gzip tar与gzip命令结合使用实现文件打包、压缩。tar只负责打包文件,但不压缩,用g...

网友评论

      本文标题:tar 使用pigz多线程打包

      本文链接:https://www.haomeiwen.com/subject/zrccgttx.html