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

相关推荐

  • DataFrame(表数据)

    DataFrame 是一个表格型的数据结构,它含有一组有序的列,每列可以是不同的值类型(数值、字符串、布尔型值)。DataFrame 既有行索引也有列索引,它可以被看做由 Seri…

    2023年 5月 16日
  • IOS-Twitter和Facebook

    文章目录简介实例步骤输出 简介 Twitter已经整合到iOS5.0,而Facebook已经被集成在 iOS 6.0中。本教程的重点讲解如何利用苹果提供的类在iOS5.0和iOS6…

    2023年 4月 1日
  • spell

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

    入门教程 2024年 3月 5日
  • Git 查看提交历史

    Git 提交历史一般常用两个命令: git log – 查看历史提交记录。 git blame – 以列表形式查看指定文件的历史修改记录。 git log …

    2024年 4月 30日
  • lvscan

    文章目录lvscan补充说明语法选项实例 lvscan 扫描逻辑卷 补充说明 lvscan命令 用于扫描当前系统中存在的所有的LVM逻辑卷。使用lvscan指令可以发现系统中的所有…

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

    文章目录dhcrelay补充说明语法选项例子 dhcrelay 使用dhcrelay命令可以提供中继DHCP和BOOTP请求 补充说明 dhcrelay命令 使用dhcrelay命…

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

    文章目录ifstat补充说明下载编译安装选项实例 ifstat 统计网络接口流量状态 补充说明 ifstat命令 就像iostat/vmstat描述其它的系统状况一样,是一个统计网…

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

    文章目录iotop补充说明安装语法选项实例 iotop 用来监视磁盘I/O使用状况的工具 补充说明 iotop命令 是一个用来监视磁盘I/O使用状况的top类工具。iotop具有与…

    入门教程 2023年 12月 19日
  • HTML 标题

    在 HTML 文档中,标题很重要。 文章目录HTML 标题实例标题很重要HTML 水平线实例HTML 注释HTML 提示 – 如何查看源代码HTML 标签参考手册 HT…

    2023年 4月 11日
  • Java 运算符

    计算机的最基本用途之一就是执行数学运算,作为一门计算机语言,Java也提供了一套丰富的运算符来操纵变量。我们可以把运算符分成以下几组: 算术运算符 关系运算符 位运算符 逻辑运算符…

    入门教程 2023年 3月 4日

发表回复

登录后才能评论
Translate »