{"id":2135,"date":"2019-05-27T00:11:04","date_gmt":"2019-05-26T16:11:04","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2135"},"modified":"2022-05-26T13:47:38","modified_gmt":"2022-05-26T05:47:38","slug":"zcat","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/zcat","title":{"rendered":"zcat\u547d\u4ee4 – \u67e5\u770b\u538b\u7f29\u6587\u4ef6\u7684\u5185\u5bb9"},"content":{"rendered":"\n

zcat\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201czip cat\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u538b\u7f29\u6587\u4ef6\u7684\u5185\u5bb9\u3002zcat\u547d\u4ee4\u53ef\u4ee5\u5728\u4e0d\u771f\u6b63\u89e3\u538b\u6587\u4ef6\u7684\u60c5\u51b5\u4e0b\u67e5\u770b\u5230\u6587\u4ef6\u5185\u5bb9\uff0c\u7c7b\u4f3c\u4e8egunnzip -c\u547d\u4ee4\u7ec4\u5408\u7684\u4f5c\u7528\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>zcat [\u53c2\u6570] \u538b\u7f29\u5305<\/p>\n\n\n\n

-S<\/td>\u5f53\u540e\u7f00\u4e0d\u662f\u6807\u51c6\u538b\u7f29\u5305\u540e\u7f00\u65f6\u4f7f\u7528\u6b64\u9009\u9879<\/td><\/tr>
-c<\/td>\u5c06\u6587\u4ef6\u5185\u5bb9\u5199\u5230\u6807\u6ce8\u8f93\u51fa<\/td><\/tr>
-d<\/td>\u6267\u884c\u89e3\u538b\u7f29\u64cd\u4f5c<\/td><\/tr>
-l<\/td>\u663e\u793a\u538b\u7f29\u5305\u4e2d\u6587\u4ef6\u7684\u5217\u8868<\/td><\/tr>
-L<\/td>\u663e\u793a\u8f6f\u4ef6\u8bb8\u53ef\u4fe1\u606f<\/td><\/tr>
-q<\/td>\u7981\u7528\u8b66\u544a\u4fe1\u606f<\/td><\/tr>
-r<\/td>\u5728\u76ee\u5f55\u4e0a\u6267\u884c\u9012\u5f52\u64cd\u4f5c<\/td><\/tr>
-t<\/td>\u6d4b\u8bd5\u538b\u7f29\u6587\u4ef6\u7684\u5b8c\u6574\u6027<\/td><\/tr>
-V<\/td>\u663e\u793a\u6307\u4ee4\u7684\u7248\u672c\u4fe1\u606f<\/td><\/tr>
-1<\/td>\u66f4\u5feb\u7684\u538b\u7f29\u901f\u5ea6<\/td><\/tr>
-9<\/td>\u66f4\u9ad8\u7684\u538b\u7f29\u6bd4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong>\uff1a<\/p>\n\n\n\n

\u5728\u4e0d\u89e3\u538b\u6587\u4ef6\u7684\u60c5\u51b5\u4e0b\uff0c\u663e\u793a\u67d0\u4e2a\u538b\u7f29\u5305\u5185\u6587\u4ef6\u7684\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# zcat file.tar.gz<\/strong><\/pre>\n\n\n\n

\u5728\u4e0d\u89e3\u538b\u6587\u4ef6\u7684\u60c5\u51b5\u4e0b\uff0c\u663e\u793a\u591a\u4e2a\u538b\u7f29\u5305\u5185\u6587\u4ef6\u7684\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# zcat file1.tar.gz file2.tar.gz<\/strong><\/pre>\n\n\n\n

\u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u7684\u538b\u7f29\u4fe1\u606f\uff08\u538b\u7f29\u540e\u5927\u5c0f\uff0c\u672a\u538b\u7f29\u5927\u5c0f\uff0c\u538b\u7f29\u7387\uff0c\u6587\u4ef6\u540d\uff09\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# zcat -l file.tar.gz <\/strong>\n         compressed        uncompressed  ratio uncompressed_name\n            6316096            27074560  76.7% file.tar<\/pre>\n","protected":false},"excerpt":{"rendered":"

zcat\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201czip cat\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u538b\u7f29\u6587\u4ef6\u7684\u5185\u5bb9\u3002zcat\u547d\u4ee4\u53ef\u4ee5\u5728\u4e0d\u771f\u6b63\u89e3 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2135"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=2135"}],"version-history":[{"count":13,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2135\/revisions"}],"predecessor-version":[{"id":10063,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2135\/revisions\/10063"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}