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

相关推荐

  • zcat

    文章目录zcat补充说明语法选项参数 zcat 显示压缩包中文件的内容 补充说明 zcat命令 用于不真正解压缩文件,就能显示压缩包中文件的内容的场合。 语法 zcat(选项)(参…

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

    文章目录zip补充说明语法选项参数实例问题解决 zip 可以用来解压缩文件 补充说明 zip命令 可以用来解压缩文件,或者对文件进行打包操作。zip是个使用广泛的压缩程序,文件经它…

    入门教程 2024年 3月 11日
  • 36. 写入文件

    欢迎来到 Golang 系列教程的第 36 篇。 在这一章我们将学习如何使用 Go 语言将数据写到文件里面。并且还要学习如何同步的写到文件里面。 这章教程包括如下几个部分: 将字符…

    2023年 12月 5日
  • lsblk

    文章目录lsblk补充说明选项实例 lsblk 列出块设备信息 补充说明 lsblk命令 用于列出所有可用块设备的信息,而且还能显示他们之间的依赖关系,但是它不会列出RAM盘的信息…

    入门教程 2023年 12月 19日
  • 27. 组合取代继承

    欢迎来到 Golang 系列教程的第 27 篇。 Go 不支持继承,但它支持组合(Composition)。组合一般定义为“合并在一起”。汽车就是一个关于组合的例子:一辆汽车由车轮…

    2023年 12月 5日
  • chgrp

    文章目录chgrp补充说明语法选项参数实例 chgrp 用来变更文件或目录的所属群组 补充说明 chgrp命令 用来改变文件或目录所属的用户组。该命令用来改变指定文件所属的用户组。…

    入门教程 2023年 12月 7日
  • Java StringBuffer 和 StringBuilder 类

    当对字符串进行修改的时候,需要使用 StringBuffer 和 StringBuilder 类。 和 String 类不同的是,StringBuffer 和 StringBuil…

    2023年 3月 4日
  • file

    文章目录file补充说明语法选项参数实例 file 用来探测给定文件的类型 补充说明 file命令 用来探测给定文件的类型。file命令对文件的检查分为文件系统、魔法幻数检查和语言…

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

    文章目录top补充说明语法选项top交互命令实例 top 显示或管理执行中的程序 补充说明 top命令 可以实时动态地查看系统的整体运行情况,是一个综合了多方信息监测系统性能和运行…

    入门教程 2024年 3月 11日
  • 基本语法

    文章目录C++ 程序结构实例编译 & 执行 C++ 程序C++ 中的分号 & 语句块C++ 标识符C++ 关键字三字符组C++ 中的空格 C++ 程序结构 让我们看…

    2024年 3月 18日

发表回复

登录后才能评论
Translate »