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

相关推荐

  • 变参函数

    文章目录变参函数什么是变参函数?语法案例切片 VS 可变参数将切片传入可变参数 变参函数 上一节:第十一篇 数组和切片下一节:第十三篇 Map 这是本Golang系列教程的第12篇…

    2023年 12月 5日
  • fc

    文章目录fc概要主要用途选项参数返回值例子注意 fc 显示历史列表中的命令或修改指定的历史命令并执行。 概要 fc [-e ename] [-lnr] [first] [last]…

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

    tail 在屏幕上显示指定文件的末尾若干行 补充说明 tail命令 用于输入文件中的尾部内容。 默认在屏幕上显示指定文件的末尾10行。 处理多个文件时会在各个文件之前附加含有文件名…

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

    文章目录mailq补充说明语法选项实例 mailq 显示待发送的邮件队列 补充说明 mailq命令 用户显示待发送的邮件队列,显示的每一个条目包括邮件队列id、邮件大小、加入队列时…

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

    文章目录ifcfg补充说明语法参数 ifcfg 置Linux中的网络接口参数 补充说明 ifcfg命令 是一个Bash脚本程序,用来设置Linux中的网络接口参数。 语法 ifcf…

    入门教程 2023年 12月 19日
  • HTML 编辑器

    可以使用专业的 HTML 编辑器来编辑 HTML,菜鸟教程为大家推荐几款常用的编辑器: VS Code:https://code.visualstudio.com/ Sublime…

    2023年 4月 11日
  • xargs

    文章目录xargs补充说明xargs 命令用法使用 -n 进行多行输出使用 -d 分割输入读取 stdin结合 -I 选项结合 find 命令使用打印出执行的命令使用 -p 选项确…

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

    文章目录basename补充说明语法选项参数实例 basename 打印目录或者文件的基本名称 补充说明 basename命令 用于打印目录或者文件的基本名称。basename和d…

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

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

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

    文章目录php补充说明语法选项参数 php PHP语言的命令行接口 补充说明 php命令 是流行的Web开发语言PHP的命令行接口,可以使用PHP语言开发基于命令行的系统管理脚本程…

    入门教程 2024年 3月 1日

发表回复

登录后才能评论
Translate »