{"id":2818,"date":"2019-05-28T23:51:38","date_gmt":"2019-05-28T15:51:38","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2818"},"modified":"2019-05-30T16:32:06","modified_gmt":"2019-05-30T08:32:06","slug":"compress","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/compress","title":{"rendered":"compress\u547d\u4ee4 – unix\u6863\u6848\u538b\u7f29\u547d\u4ee4"},"content":{"rendered":"\n

compress\u547d\u4ee4\u662f\u4e00\u4e2a\u76f8\u5f53\u53e4\u8001\u7684 unix \u6863\u6848\u538b\u7f29\u6307\u4ee4\uff0c\u538b\u7f29\u540e\u7684\u6863\u6848\u4f1a\u52a0\u4e0a\u4e00\u4e2a .Z \u5ef6\u4f38\u6863\u540d\u4ee5\u533a\u522b\u672a\u538b\u7f29\u7684\u6863\u6848\uff0c\u538b\u7f29\u540e\u7684\u6863\u6848\u53ef\u4ee5\u4ee5 uncompress \u89e3\u538b\u3002\u82e5\u8981\u5c06\u6570\u4e2a\u6863\u6848\u538b\u6210\u4e00\u4e2a\u538b\u7f29\u6863\uff0c\u5fc5\u987b\u5148\u5c06\u6863\u6848 tar \u8d77\u6765\u518d\u538b\u7f29\u3002\u7531\u4e8e gzip \u53ef\u4ee5\u4ea7\u751f\u66f4\u7406\u60f3\u7684\u538b\u7f29\u6bd4\u4f8b\uff0c\u4e00\u822c\u4eba\u591a\u5df2\u6539\u7528 gzip \u4e3a\u6863\u6848\u538b\u7f29\u5de5\u5177\u3002 <\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong> compress [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong> <\/p>\n\n\n\n
-c<\/td>\u8f93\u51fa\u7ed3\u679c\u81f3\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\uff08\u4e00\u822c\u6307\u8367\u5e55\uff09 <\/td><\/tr>
-f<\/td>\u5f3a\u8feb\u5199\u5165\u6863\u6848\uff0c\u82e5\u76ee\u7684\u6863\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u4f1a\u88ab\u8986\u76d6 (force) <\/td><\/tr>
-v<\/td>\u5c06\u7a0b\u5e8f\u6267\u884c\u7684\u8baf\u606f\u5370\u5728\u8367\u5e55\u4e0a (verbose) <\/td><\/tr>
-b<\/td>\u8bbe\u5b9a\u5171\u540c\u5b57\u4e32\u6570\u7684\u4e0a\u9650\uff0c\u4ee5\u4f4d\u5143\u8ba1\u7b97\uff0c\u53ef\u4ee5\u8bbe\u5b9a\u7684\u503c\u4e3a 9 \u81f3 16 bits \u3002\u7531\u4e8e\u503c\u8d8a\u5927\uff0c\u80fd\u4f7f\u7528\u7684\u5171\u540c\u5b57\u4e32\u5c31 \u8d8a\u591a\uff0c\u538b\u7f29\u6bd4\u4f8b\u5c31\u8d8a\u5927\uff0c\u6240\u4ee5\u4e00\u822c\u4f7f\u7528\u9884\u8bbe\u503c 16 bits (bits) <\/td><\/tr>
-d<\/td>\u5c06\u538b\u7f29\u6863\u89e3\u538b\u7f29 <\/td><\/tr>
-V<\/td>\u5217\u51fa\u7248\u672c\u8baf\u606f <\/td><\/tr><\/tbody><\/table>\n\n\n\n

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

\u538b\u7f29\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compress abc.h<\/pre>\n\n\n\n

\u89e3\u538b\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compress -d abc.h.Z   <\/pre>\n\n\n\n

\u6309\u6307\u5b9a\u538b\u7f29\u6bd4\u4f8b\u8fdb\u884c\u538b\u7f29\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compress -b 7 abc.h   <\/pre>\n\n\n\n

\u5f3a\u5236\u538b\u7f29\u6587\u4ef6\u5939\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compress -rf \/home\/abc\/   <\/pre>\n\n\n\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

compress\u547d\u4ee4\u662f\u4e00\u4e2a\u76f8\u5f53\u53e4\u8001\u7684 unix \u6863\u6848\u538b\u7f29\u6307\u4ee4\uff0c\u538b\u7f29\u540e\u7684\u6863\u6848\u4f1a\u52a0\u4e0a\u4e00\u4e2a .Z \u5ef6\u4f38\u6863\u540d\u4ee5\u533a\u522b\u672a\u538b […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2818"}],"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=2818"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2818\/revisions"}],"predecessor-version":[{"id":2954,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2818\/revisions\/2954"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}