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

相关推荐

  • lpq

    文章目录lpq补充说明语法选项 lpq 显示打印队列中的打印任务的状态信息 补充说明 lpq命令 用于显示打印队列中的打印任务的状态信息。 语法 lpq(选项) 选项 -E:强制使…

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

    文章目录return概要主要用途参数返回值例子注意 return 从函数中退出并返回数值。 概要 return [n] 主要用途 使得shell函数退出并返回数值,如果没有指定n的…

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

    文章目录ag补充说明语法选项实例 ag ack 的升级版,C语言编写,更快更人性化 补充说明 摘自 https://github.com/ggreer/the_silver_sea…

    入门教程 2023年 12月 6日
  • get_module

    文章目录get_module补充说明语法实例 get_module 获取Linux内核模块的详细信息 补充说明 get_module命令 用于获取Linux内核模块的详细信息。 语…

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

    文章目录sync补充说明语法选项buffer与cache sync 用于强制被改变的内容立刻写入磁盘 补充说明 sync命令 用于强制被改变的内容立刻写入磁盘,更新超块信息。 在L…

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

    文章目录nslookup补充说明语法选项参数DNS服务器实例 nslookup 查询域名DNS信息的工具 补充说明 nslookup命令 是常用域名查询工具,就是查DNS信息用的命…

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

    文章目录indent补充说明语法选项实例 indent 格式化C语言的源文件 补充说明 indent命令 可辨识C的原始代码文件,并加以格式化,以方便程序员阅读、修改等操作。 语法…

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

    文章目录strings补充说明语法选项实例 strings 在对象文件或二进制文件中查找可打印的字符串 补充说明 strings命令 在对象文件或二进制文件中查找可打印的字符串。字…

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

    文章目录useradd补充说明语法选项参数退出值文件实例 useradd 创建的新的系统用户 补充说明 useradd命令 用于Linux中创建的新的系统用户。useradd可用来…

    入门教程 2024年 3月 11日
  • 解决WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

    远程连接ssh服务器时,若服务器系统发生了改变,旧的鉴权无法生效时,在登陆时会提示以下问题。 WARNING: REMOTE HOST IDENTIFICATION HAS CHA…

    2021年 7月 13日

发表回复

登录后才能评论
Translate »