From 3081a0dce6dd092e5d2e329f10a06547060cb629 Mon Sep 17 00:00:00 2001 From: iProbe Date: Wed, 21 Dec 2022 09:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'linux=E5=9F=BA=E7=A1=80/?= =?UTF-8?q?=E5=88=86=E5=8D=B7=E5=8E=8B=E7=BC=A9=E8=A7=A3=E5=8E=8B.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux基础/分卷压缩解压.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 linux基础/分卷压缩解压.md diff --git a/linux基础/分卷压缩解压.md b/linux基础/分卷压缩解压.md new file mode 100644 index 0000000..a94d313 --- /dev/null +++ b/linux基础/分卷压缩解压.md @@ -0,0 +1,28 @@ +# tar分卷压缩 +```bash +# 分卷压缩gz +tar zcf - aaa |split -d -b 100m - bbb.tar.gz. +# 生成文件: bbb.tar.gz.00 bbb.tar.gz.01 +# 分卷压缩bz2 +tar jcf - aaa |split -d -b 100m - bbb.tar.bz2. +# 生成文件: bbb.tar.bz2.00 bbb.tar.bz2.01 +``` +# tar分卷解压 +```bash +# 解压gz分卷 +cat bbb.tar.gz* | tar zx +# 解压bz2分卷 +cat bbb.tar.gz* | tar jx +``` +# zip分卷压缩 +```bash +# 分卷为100m的 +zip -s 100m -r bbb.zip aaa +``` +# zip分卷解压 +```bash +# 合并分卷 +zip -s 0 bbb.zip --out BBB.zip +# 解压 +unzip BBB.zip +``` \ No newline at end of file