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

相关推荐

  • uptime

    文章目录uptime补充说明语法选项实例 uptime 查看Linux系统负载信息 补充说明 uptime命令 能够打印系统总共运行了多长时间和系统的平均负载。uptime命令可以…

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

    文章目录script补充说明语法选项参数实例 script 记录终端会话的所有操作 补充说明 script 用于在终端会话中,记录用户的所有操作和命令的输出信息。简而言之,记录终端…

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

    文章目录uuto补充说明语法例子 uuto 将文件传送到远端的UUCP主机 补充说明 uuto命令 为script文件,它实际上会执行uucp,用来将文件传送到远端UUCP主机,并…

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

    文章目录dstat补充说明下载安装使用说明语法常用选项实例 dstat 通用的系统资源统计工具 补充说明 dstat命令 是一个用来替换vmstat、iostat、netstat、…

    入门教程 2023年 12月 7日
  • Helm | Helm 仓库列表

    文章目录helm repo list可选项从父命令继承的命令请参阅 helm repo list 列举chart仓库 可选项 -h, –help help for list -o…

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

    文章目录lprm补充说明语法选项参数实例 lprm 删除打印队列中的打印任务 补充说明 lprm命令 用于删除打印队列中的打印任务。尚未完成的打印机任务会被放在打印机贮列之中,这个…

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

    文章目录git补充说明语法选项例子配置修改项目中的个人信息配置自动换行常见使用场景创建SSH密钥多账号ssh配置免密码登录远程服务器https协议下提交代码免密码文件推向3个git…

    入门教程 2023年 12月 14日
  • Java 重写(Override)与重载(Overload)

    文章目录重写(Override)TestDog.java 文件代码:TestDog.java 文件代码:方法的重写规则Super 关键字的使用TestDog.java 文件代码:重…

    2023年 3月 9日
  • SQL SELECT 语句

    SELECT 语句用于从数据库中选取数据。 文章目录SQL SELECT 语句SQL SELECT 语法演示数据库SELECT Column 实例实例SELECT * 实例实例 S…

    2023年 5月 28日
  • yes

    文章目录yes补充说明语法参数实例 yes 重复打印指定字符串 补充说明 yes命令 在命令行中输出指定的字符串,直到yes进程被杀死。不带任何参数输入yes命令默认的字符串就是y…

    入门教程 2024年 3月 11日

发表回复

登录后才能评论
Translate »