CentOS 7 下 tar 命令多进程打包实践

tech2022-10-06  89

文章目录

安装依赖包打包目录解压

安装依赖包

# yum -y install pigz

打包目录

执行命令 # tar -zcf - 9 | pigz -9 -p 12 > 9.tar.gz 参数说明 tar: tar 命令 -zcf:执行压缩 - 9:需要压缩的目录 -9:压缩率 -p 12:指定 CPU 数 > 9.tar.gz:压缩为 "9.tar.gz"

解压

解压异常 # tar -zxvf 1.tar.gz tar: This does not look like a tar archive tar: Skipping to next header tar: Archive contains `\356\324\362Cok\232E\027\345>\320' where numeric off_t value expected tar: Archive contains `\312\022ڐ,Z|\271' where numeric mode_t value expected tar: Archive contains `\021(\313hאL\215\221?c\002' where numeric time_t value expected tar: Archive contains `kڈ\334͌\244\272' where numeric uid_t value expected tar: Archive contains obsolescent base-64 headers tar: Archive contains `+\360\026ŭ+{' where numeric gid_t value expected \005\272;\264n\272¤\225j\2475\344M_e\302\362\031Iu'\274\247\0332\340\321\n\225\241\302-\37292d\3216@\231\234\265\350Qܑ\036\355\204\035\230&\004Z\242,.W\020\216\201\254\006\267\220DI\204\221\256\232\375rw\245,\345\304\034\036g\334 \024\032Q\362\350?\237\323\b\037\v\024\222\302\304[ tar: \005\272;\264n\272¤\225j\2475\344M_e\302\362\031Iu'\274\247\0332\340\321\n\225\241\302-\37292d\3216@\231\234\265\350Qܑ\036\355\204\035\230&\004Z\242,.W\020\216\201\254\006\267\220DI\204\221\256\232\375rw\245,\345\304\034\036g\334 \024\032Q\362\350?\237\323\b\037\v\024\222\302\304[: Unknown file type `񪟥xtracted as normal file tar: º;´nº¤j§5㌟eòIu'¼§ ¡-󱥑6@µ璜킝&Z¢,.W¬·DI®󣭥gڠQ󦿟 Ä[: implausibly old time stamp 1970-01-01 07:59:59 tar: Skipping to next header Xshelltar: Archive contains `\203?\362\343\334P\342P\334ڄ\273' where numeric off_t value expected tar: Archive contains `\237\vѥ\222\254\340\225' where numeric mode_t value expected tar: Archive contains `\324U\231\225\037.U6+4\373F' where numeric time_t value expected tar: Archive contains `\221\327\323v\321\361\362\t' where numeric uid_t value expected tar: Archive contains `/\262yz\375\f\300\335' where numeric gid_t value expected .\362\006w\273[\345H~\326\365R0Dݒ\243r\354\\\256$\220<ζ$I\256\264\233\n\371\006\243I\253ok\3502\2634\031\334P\277&\031[\353\257\3626n\354ۤ\254\350\337\024_A*Ț\032\343\202G\227\212\233\023a\021\257\025\a\344\335\031\310\360zf\226\377\314l\356\376\214z\an~;C tar: .\362\006w\273[\345H~\326\365R0Dݒ\243r\354\\\256$\220<ζ$I\256\264\233\n\371\006\243I\253ok\3502\2634\031\334P\277&\031[\353\257\3626n\354ۤ\254\350\337\024_A*Ț\032\343\202G\227\212\233\023a\021\257\025\a\344\335\031\310\360zf\226\377\314l\356\376\214z\an~;C: Unknown file type `e', extracted as normal file tar: .巻[䇾׵R0Dݒ£r뜮$<ζ$I®´ 򢉫ok河4ې¿&[밲6n훤¬靔_A*Țぇa¯囙ɰzfÿˬフzn~;C: implausibly old time stamp 1970-01-01 07:59:59 tar: Skipping to next header 正常解压 – gzip # gzip -d 1.tar.gz 正常解压 – tar # tar -zxvf 1.tar
最新回复(0)