Warning: Undefined array key "custom_message" in /www/wwwroot/bbs.aaronyang.cc/wp-content/plugins/wpcopyrights/index.php on line 105

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

相关推荐

  • 创建第一款iPhone应用程序

    现在让我们来创建一个在iOS模拟器上运行的简单视图应用(空白的应用程序)。 操作步骤如下: 1、打开Xcode并选择创建一个新的Xcode项目。 然后选择单一视图应用程序 接下来输…

    2023年 3月 29日
  • sftp

    文章目录sftp补充说明语法选项参数实例 sftp 交互式的文件传输程序 补充说明 sftp命令 是一款交互式的文件传输程序,命令的运行和使用方式与ftp命令相似,但是,sftp命…

    入门教程 2024年 3月 4日
  • vgrename

    文章目录vgrename补充说明语法选项例子 vgrename 使用vgrename命令可以重命名卷组的名称 补充说明 grename命令 可以重命名卷组的名称。 语法 vgren…

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

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

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

    文章目录mesg补充说明语法参数实例 mesg 设置当前终端的写权限 补充说明 mesg命令 用于设置当前终端的写权限,即是否让其他用户向本终端发信息。将mesg设置y时,其他用户…

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

    文章目录logrotate补充说明语法选项参数实例注意事项 logrotate 系统日志进行轮转、压缩和删除 补充说明 logrotate命令 用于对系统日志进行轮转、压缩和删除,…

    入门教程 2023年 12月 19日
  • iptables-save

    文章目录iptables-save补充说明语法选项实例 iptables-save 备份iptables的表配置 补充说明 iptables-save命令 用于将linux内核中的…

    入门教程 2023年 12月 19日
  • Java Scanner 类

    java.util.Scanner 是 Java5 的新特征,我们可以通过 Scanner 类来获取用户的输入。 下面是创建 Scanner 对象的基本语法: Scanner s …

    入门教程 2023年 3月 4日
  • SQL语法

    文章目录数据库表解析SQL 语句请记住…SQL 语句后面的分号?一些最重要的 SQL 命令 数据库表 一个数据库通常包含一个或多个表。每个表有一个名字标识(例如:&qu…

    2023年 5月 28日
  • HTTP content-type

    Content-Type(内容类型),一般是指网页中存在的 Content-Type,用于定义网络文件的类型和网页的编码,决定浏览器将以什么形式、什么编码读取这个文件,这就是经常看…

    2023年 5月 14日

发表回复

登录后才能评论
Translate »