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

相关推荐

  • nc

    文章目录nc补充说明语法选项实例 nc nc是网络工具中的瑞士军刀 补充说明 nc命令 全称netcat,用于TCP、UDP或unix域套接字(uds)的数据流操作,它可以打开TC…

    入门教程 2024年 1月 10日
  • telnet

    文章目录telnet补充说明语法选项参数实例 telnet 登录远程主机和管理(测试ip端口是否连通) 补充说明 telnet命令 用于登录远程主机,对远程主机进行管理。telne…

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

    文章目录cdrecord补充说明语法选项参数实例 cdrecord Linux系统下光盘刻录功能命令 补充说明 cdrecord命令 用于Linux系统下光盘刻录,它支持cd和DV…

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

    文章目录declare语法主要用途选项参数返回值例子讨论注意 declare 声明变量,设置或显示变量的值和属性。 语法 declare [-aAfFgilnrtux] [-p] …

    入门教程 2023年 12月 7日
  • 创建第一款iPhone应用程序

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

    2023年 3月 29日
  • inotifywait

    文章目录inotifywait补充说明安装inotify-toolsinotify相关参数inotifywait命令使用inotifywait命令参数可监听的事件 inotifyw…

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

    文章目录shuf概要主要用途选项参数返回值例子注意 shuf 产生随机的排列。 概要 shuf [OPTION]… [FILE] shuf -e [OPTION]… [AR…

    入门教程 2024年 3月 5日
  • Git 安装配置

    在使用Git前我们需要先安装 Git。Git 目前支持 Linux/Unix、Solaris、Mac和 Windows 平台上运行。 Git 各平台安装包下载地址为:http://…

    2024年 4月 30日
  • mkfs

    文章目录mkfs补充说明语法选项参数实例 mkfs 用于在设备上创建Linux文件系统 补充说明 mkfs命令 用于在设备上(通常为硬盘)创建Linux文件系统。mkfs本身并不执…

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

    文章目录systemctl补充说明实例 systemctl 系统服务管理器指令 补充说明 systemctl命令 是系统服务管理器指令,它实际上将 service 和 chkcon…

    入门教程 2024年 3月 11日

发表回复

登录后才能评论
Translate »