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

相关推荐

  • TCP/IP 寻址

    TCP/IP 使用 32 个比特或者 4 组 0 到 255 之间的数字来为计算机编址。 文章目录IP地址IP 地址包含 4 组数字:32 比特 = 4 字节IP V6域名 IP地…

    2023年 5月 15日
  • hostid

    文章目录hostid概要主要用途选项例子注意 hostid 显示当前主机的十六进制数字标识。 概要 hostid [OPTION]… 主要用途 显示当前主机的十六进制标识符。 …

    入门教程 2023年 12月 15日
  • arj

    文章目录arj补充说明语法参数 arj 用于创建和管理.arj压缩包 补充说明 arj命令 是 .arj 格式的压缩文件的管理器,用于创建和管理 .arj 压缩包。 语法 arj(…

    入门教程 2023年 12月 6日
  • edquota

    文章目录edquota补充说明语法选项参数实例 edquota 用于编辑指定用户或工作组磁盘配额 补充说明 edquota命令 用于编辑指定用户或工作组磁盘配额。edquota预设…

    入门教程 2023年 12月 14日
  • systemctl

    文章目录systemctl补充说明实例 systemctl 系统服务管理器指令 补充说明 systemctl命令 是系统服务管理器指令,它实际上将 service 和 chkcon…

    入门教程 2024年 3月 11日
  • if else 语句

    if else 语句 上一节:第七篇 包下一节:第九篇 循环语句 这是本Golang系列教程的第8篇。 if 是一个条件语句。if 语句的语法为: if condition { }…

    2023年 12月 5日
  • lastlog

    文章目录lastlog补充说明语法选项实例 lastlog 显示系统中所有用户最近一次登录信息 补充说明 lastlog命令 用于显示系统中所有用户最近一次登录信息。 lastlo…

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

    文章目录cupsdisable补充说明语法选项参数 cupsdisable 停止指定的打印机 补充说明 cupsdisable命令 用于停止指定的打印机。 语法 cupsdisab…

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

    文章目录alias概要主要用途选项返回值例子知识点错误用法Q&A注意其他参考链接 alias 定义或显示别名。 概要 alias [-p] [name[=value] ..…

    入门教程 2023年 12月 6日
  • ln

    文章目录ln补充说明语法选项参数实例扩展知识软链接:硬链接符号链接(软连接) ln 用来为文件创建链接 补充说明 ln命令 用来为文件创建链接,链接类型分为硬链接和符号链接两种,默…

    入门教程 2023年 12月 19日

发表回复

登录后才能评论
Translate »