概述
文章目录
- 安装依赖包
- 打包目录
- 解压
安装依赖包
# yum -y install pigz
打包目录
- 执行命令
# tar -zcf - 9 | pigz -9 -p 12 > 9.tar.gz
- 参数说明
tar: tar 命令
-zcf:执行压缩
- 9:需要压缩的目录
-9:压缩率
-p 12:指定 CPU 数
> 9.tar.gz:压缩为 "9.tar.gz"
解压
- 解压异常
# tar -zxvf 1.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains `356324362Cok232E 27345>320' where numeric off_t value expected
tar: Archive contains `312 22ڐ,Z|271' where numeric mode_t value expected
tar: Archive contains `