SDK 多线程超快压缩/解压命令

文摘 Linux Ubuntu 2020-01-3 阅读:9980

linux_tar_gz.jpg

压缩:


tar --use-compress-program=pigz -cvpf ./sdk_20221124A.tar.gz ./ZS285A

压缩排除指定目录(--exclude=待排除目录,目录都是相对路径):

tar --exclude=./ZS285A/.git --use-compress-program=pigz -cvpf ./sdk_20221124A.tar.gz ./ZS285A

压缩并分割:

tar --use-compress-program=pigz -cvpf - ./alps | split -d -b 3072m - ./alps_20200805.tar.gz

如果需要排除某个目录(--exclude=待排除目录,目录都是相对路径):

tar --exclude=./ZS285A/.git --use-compress-program=pigz -cvpf - ./ZS285A | split -d -b 50m - ./sdk_20221124A.tar.gz

解压命令:

cat alps_20200805.tar.gz* | tar --use-compress-program=pigz -xvf -

:如提示 tar (grandchild): pigz: Cannot exec: No such file or directory
请先安装pigz:sudo apt-get install pigz

0条评论

© 2024 芯缘异码. Powered by Typecho