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

相关推荐

  • linux 字符界面浏览器 w3m

    文章目录使用背景常用操作用快捷键页面操作超链接操作文件/流 操作缓存操作缓存选择模式(也就是按了s以後)书签操作搜索标记杂项行编辑模式 使用背景 linux无UI界面情况下,使用这…

    2023年 2月 17日
  • IOS发送电子邮件

    文章目录简介实例步骤输出 简介 我们可以使用IOS设备中的电子邮件应用程序发送电子邮件。 实例步骤 1、创建一个简单的View based application 2、选择项目文件…

    2023年 4月 1日
  • apt-key

    文章目录apt-key补充说明语法参数实例 apt-key 管理Debian Linux系统中的软件包密钥 补充说明 apt-key命令 用于管理Debian Linux系统中的软…

    入门教程 2023年 12月 6日
  • mii-tool

    文章目录mii-tool补充说明语法选项实例 mii-tool 配置网络设备协商方式的工具 补充说明 mii-tool命令 是用于查看、管理介质的网络接口的状态,有时网卡需要配置协…

    入门教程 2024年 1月 3日
  • lpadmin

    文章目录lpadmin补充说明语法选项参数 lpadmin 配置CUPS套件中的打印机和类 补充说明 lpadmin命令 用于配置CUPS套件中的打印机和类,也被用来设置打印服务器…

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

    文章目录od补充说明语法选项参数实例 od 输出文件的八进制、十六进制等格式编码的字节 补充说明 od命令 用于输出文件的八进制、十六进制或其它格式编码的字节,通常用于显示或查看文…

    入门教程 2024年 1月 23日
  • more

    文章目录more补充说明语法选项参数实例 more 显示文件内容,每次显示一屏 补充说明 more命令 是一个基于vi编辑器文本过滤器,它以全屏幕的方式按页显示文本文件的内容,支持…

    入门教程 2024年 1月 3日
  • seinfo

    文章目录seinfo补充说明语法选项实例 seinfo 查询SELinux的策略提供多少相关规则 补充说明 seinfo命令 是用来查询SELinux的策略提供多少相关规则,一个主…

    入门教程 2024年 3月 4日
  • tree

    文章目录tree补充说明语法选项参数实例 tree 树状图列出目录的内容 补充说明 tree命令 以树状图列出目录的内容。 语法 tree(选项)(参数) 选项 ——- 列…

    入门教程 2024年 3月 11日
  • Helm

    针对Kubernetes的Helm包管理器。 文章目录简介可选项另请参阅 简介 Kubernetes包管理器 Helm的一般操作: helm search:   搜索chart h…

    入门教程 2023年 12月 14日

发表回复

登录后才能评论
Translate »