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

相关推荐

  • logger

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

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

    文章目录uniq概要主要用途选项参数返回值例子注意 uniq 显示或忽略重复的行。 概要 uniq [OPTION]… [INPUT [OUTPUT]] 主要用途 将输入文件(…

    入门教程 2024年 3月 11日
  • Git 远程仓库(Github)

    Git 并不像 SVN 那样有个中心服务器。 目前我们使用到的 Git 命令都是在本地执行,如果你想通过 Git 分享你的代码或者与其他开发人员合作。 你就需要将数据放到一台其他开…

    2024年 4月 30日
  • cksum

    文章目录cksum补充说明语法选项参数实例 cksum 检查文件的CRC是否正确 补充说明 cksum命令 是检查文件的CRC是否正确,确保文件从一个系统传输到另一个系统的过程中不…

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

    文章目录spell补充说明语法参数 spell 对文件进行拼写检查 补充说明 spell命令 对文件进行拼写检查,并把拼写错误的单词输出。 语法 spell(参数) 参数 文件:指…

    入门教程 2024年 3月 5日
  • blockdev

    文章目录blockdev补充说明语法参数实例 blockdev 从命令行调用区块设备控制程序 补充说明 blockdev命令 在命令调用“ioxtls”函数,以实现对设备的控制。 …

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

    文章目录pushd概要主要用途选项参数返回值例子注意参考链接 pushd 将目录添加到目录堆栈顶部。 概要 pushd [-n] [+N | -N | dir] 主要用途 将目录添…

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

    文章目录dc说明语法选项示例支持的运算 dc 任意精度计算器 说明 dc 是一款逆波兰表达式计算器,支持无限制精度的算术运算。它还允许您定义和调用宏。通常,dc从标准输入读取,也可…

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

    文章目录timedatectl补充说明概要主要用途参数例子 timedatectl 用于在 Linux 中设置或查询系统时间、日期和时区等配置。 补充说明 在 Linux 运维中,…

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

    文章目录make补充说明语法选项参数知识扩展 make GNU的工程化编译工具 补充说明 make命令 是GNU的工程化编译工具,用于编译众多相互关联的源代码文件,以实现工程化的管…

    入门教程 2024年 1月 3日

发表回复

登录后才能评论
Translate »