pigz

pigz

可以用来解压缩文件,gzip的并行实现升级版

补充说明

pigz命令可以用来解压缩文件,最重要的是支持多线程并行处理,解压缩比gzip快。主页: http://zlib.net/pigz/

语法

pigz [ -cdfhikKlLmMnNqrRtz0..9,11 ] [ -b blocksize ] [ -p threads ] [ -S suffix ] [ name ...  ]
unpigz [ -cfhikKlLmMnNqrRtz ] [ -b blocksize ] [ -p threads ] [ -S suffix ] [ name ...  ]

参数

-0 to -9, -11       # Compression level (level 11, zopfli, is much slower)
--fast, --best      # Compression levels 1 and 9 respectively
-b, --blocksize mmm # Set compression block size to mmmK (default 128K)
-c, --stdout        # Write all processed output to stdout (won't delete)
-d, --decompress    # Decompress the compressed input
-f, --force         # Force overwrite, compress .gz, links, and to terminal
-F  --first         # Do iterations first, before block split for -11
-h, --help          # Display a help screen and quit
-i, --independent   # Compress blocks independently for damage recovery
-I, --iterations n  # Number of iterations for -11 optimization
-J, --maxsplits n   # Maximum number of split blocks for -11
-k, --keep          # Do not delete original file after processing
-K, --zip           # Compress to PKWare zip (.zip) single entry format
-l, --list          # List the contents of the compressed input
-L, --license       # Display the pigz license and quit
-m, --no-time       # Do not store or restore mod time
-M, --time          # Store or restore mod time
-n, --no-name       # Do not store or restore file name or mod time
-N, --name          # Store or restore file name and mod time
-O  --oneblock      # Do not split into smaller blocks for -11
-p, --processes n   # Allow up to n compression threads (default is the number of online processors, or 8 if unknown)
-q, --quiet         # Print no messages, even on error
-r, --recursive     # Process the contents of all subdirectories
-R, --rsyncable     # Input-determined block locations for rsync
-S, --suffix .sss   # Use suffix .sss instead of .gz (for compression)
-t, --test          # Test the integrity of the compressed input
-v, --verbose       # Provide more verbose output
-V  --version       # Show the version of pigz
-Y  --synchronous   # Force output file write to permanent storage
-z, --zlib          # Compress to zlib (.zz) instead of gzip format
--                  # All arguments after "--" are treated as files

实例

可以结合tar使用, 压缩命令

tar -cvf - dir1 dir2 dir3 | pigz -p 8 > output.tgz

解压命令

pigz -p 8 -d output.tgz

如果是gzip格式,也支持用tar解压

tar -xzvf output.tgz

若文章对你有帮助,可以点赞或打赏支持我们。发布者:Aurora,转载请注明出处:http://61.174.243.28:13541/AY-knowledg-hub/pigz/

(0)
AuroraAurora站点维系者
上一篇 2024年 3月 1日 下午4:31
下一篇 2024年 3月 1日 下午4:31

相关推荐

  • break

    文章目录break概要主要用途参数返回值例子注意 break 结束for,while或until循环。 概要 break [n] 主要用途 结束for,while或until循环,…

    入门教程 2023年 12月 6日
  • HTML 基础

    文章目录HTML 基础- 4个实例HTML 标题实例HTML 段落实例HTML 链接实例HTML 图像实例 HTML 基础- 4个实例 不要担心本章中您还没有学过的例子。 您将在下…

    入门教程 2023年 4月 11日
  • ifup

    文章目录ifup补充说明语法参数实例 ifup 激活指定的网络接口 补充说明 ifup命令 用于激活指定的网络接口。 语法 ifup(参数) 参数 网络接口:要激活的网络接口。 实…

    入门教程 2023年 12月 19日
  • logger

    文章目录logger补充说明语法选项例子 logger 在系统日志中记录相应条目 补充说明 logger命令 是用于往系统中写入日志,他提供一个shell命令接口到syslog系统…

    入门教程 2023年 12月 19日
  • ngrep

    文章目录ngrep补充说明安装语法选项实例 ngrep 方便的数据包匹配和显示工具 补充说明 ngrep命令 是grep命令的网络版,他力求更多的grep特征,用于搜寻指定的数据包…

    入门教程 2024年 1月 10日
  • uname

    文章目录uname概要主要用途选项返回值例子注意 uname 打印系统信息。 概要 uname [OPTION]… 主要用途 打印机器和操作系统的信息。 当没有选项时,默认启用…

    入门教程 2024年 3月 11日
  • Java 对象和类

    Java作为一种面向对象语言。支持以下基本概念: 多态 继承 封装 抽象 类 对象 实例 方法 重载 本节我们重点研究对象和类的概念。 对象:对象是类的一个实例(对象不是找个女朋友…

    2023年 3月 4日
  • Pandas JSON

    JSON(JavaScript Object Notation,JavaScript 对象表示法),是存储和交换文本信息的语法,类似 XML。 JSON 比 XML 更小、更快,更…

    2023年 5月 16日
  • createrepo

    文章目录createrepo概要描述选项返回值例子 createrepo 创建YUM仓库 概要 createrepo [选项] <目录> 描述 createrepo是一…

    入门教程 2023年 12月 7日
  • lvresize

    文章目录lvresize补充说明语法选项参数实例 lvresize 调整逻辑卷空间大小 补充说明 lvresize命令 用于调整LVM逻辑卷的空间大小,可以增大空间和缩小空间。使用…

    入门教程 2023年 12月 19日

发表回复

登录后才能评论
Translate »