Linux的pigz命令怎么使用
这篇文章主要介绍“Linux的pigz命令怎么使用”,在日常操作中,相信很多人在Linux的pigz命令怎么使用问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Linux的pigz命令怎么使用”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
Linux常用命令pigz命令可以用来解压缩文件,最重要的是支持多线程并行处理,解压缩比gzip快。
pigz可以用来解压缩文件,gzip的并行实现升级版
语法pigz[-cdfhikKlLmMnNqrRtz0..9,11][-bblocksize][-pthreads][-Ssuffix][name...]unpigz[-cfhikKlLmMnNqrRtz][-bblocksize][-pthreads][-Ssuffix][name...]参数
-0to-9,-11#Compressionlevel(level11,zopfli,ismuchslower)--fast,--best#Compressionlevels1and9respectively-b,--blocksizemmm#SetcompressionblocksizetommmK(default128K)-c,--stdout#Writeallprocessedoutputtostdout(won'tdelete)-d,--decompress#Decompressthecompressedinput-f,--force#Forceoverwrite,compress.gz,links,andtoterminal-F--first#Doiterationsfirst,beforeblocksplitfor-11-h,--help#Displayahelpscreenandquit-i,--independent#Compressblocksindependentlyfordamagerecovery-I,--iterationsn#Numberofiterationsfor-11optimization-J,--maxsplitsn#Maximumnumberofsplitblocksfor-11-k,--keep#Donotdeleteoriginalfileafterprocessing-K,--zip#CompresstoPKWarezip(.zip)singleentryformat-l,--list#Listthecontentsofthecompressedinput-L,--license#Displaythepigzlicenseandquit-m,--no-time#Donotstoreorrestoremodtime-M,--time#Storeorrestoremodtime-n,--no-name#Donotstoreorrestorefilenameormodtime-N,--name#Storeorrestorefilenameandmodtime-O--oneblock#Donotsplitintosmallerblocksfor-11-p,--processesn#Allowuptoncompressionthreads(defaultisthenumberofonlineprocessors,or8ifunknown)-q,--quiet#Printnomessages,evenonerror-r,--recursive#Processthecontentsofallsubdirectories-R,--rsyncable#Input-determinedblocklocationsforrsync-S,--suffix.sss#Usesuffix.sssinsteadof.gz(forcompression)-t,--test#Testtheintegrityofthecompressedinput-v,--verbose#Providemoreverboseoutput-V--version#Showtheversionofpigz-Y--synchronous#Forceoutputfilewritetopermanentstorage-z,--zlib#Compresstozlib(.zz)insteadofgzipformat--#Allargumentsafter"--"aretreatedasfiles实例
可以结合tar使用, 压缩命令
tar-cvf-dir1dir2dir3|pigz-p8>output.tgz
解压命令
pigz-p8-doutput.tgz
如果是gzip格式,也支持用tar解压
tar-xzvfoutput.tgz
到此,关于“Linux的pigz命令怎么使用”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。