常用压缩命令

zstd 比gzip好用的压缩工具

# zstd 压缩解压速度比gzip快约3位 极限压缩时可以压得更小
# 安装 没有依赖项
yum install https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/Packages/z/zstd-1.3.8-1.el7.x86_64.rpm
# 压缩
zstd -3 filename.tar   # 生成压缩文件名为 filename.tar.zst  压缩级别默认3 ,极限19
# 解压
zstd -d filename.tar.zst 或 unzstd filename.tar.zst
# 与tar结合使用 -I --use-compress-program
# 压缩
tar -I zstd -cf filename.tar.zst filename/
# 解压
tar -I zstd -xf filename.tar.zst
原文地址:https://www.cnblogs.com/kcxg/p/10811544.html