{"id":264681,"date":"2023-02-19T22:17:26","date_gmt":"2023-02-19T14:17:26","guid":{"rendered":"https:\/\/lrxjmw.cn\/pzwwgszdljtj.html"},"modified":"2023-02-19T22:17:26","modified_gmt":"2023-02-19T14:17:26","slug":"pzwwgszdljtj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/pzwwgszdljtj.html","title":{"rendered":"php\u4e2d\u6587\u7f51\u683c\u5f0fzip\u7684\u8def\u5f84\u63a8\u8350\u53ca\u63a8\u8350\u6559\u7a0b\uff01\u6559\u7a0b"},"content":{"rendered":"

tar\u6587\u4ef6\u89e3\u538b\u5931\u8d25linux_linux\u600e\u4e48\u89e3\u538btar\u6587\u4ef6_linux\u4e0btar\u6587\u4ef6\u89e3\u538b<\/p>\n

\u4e00\u3001zip\u683c\u5f0f<\/p>\n

zip\u53ef\u80fd\u662f\u76ee\u524d\u4f7f\u7528\u7684\u6700\u591a\u7684\u6587\u6863\u538b\u7f29\u683c\u5f0f\u3002\u5b83\u6700\u5927\u7684\u4f18\u70b9\u5c31\u662f\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf<\/a>\u5e73\u53f0\u4e0a\u4f7f\u7528\u3002\u7f3a\u70b9\u5c31\u662f\u652f\u6301\u7684\u538b\u7f29\u7387\u4e0d\u662f\u5f88\u9ad8\uff0c\u800ctar.gz\u548ctar.bz2\u5728\u538b\u7f29\u7387\u65b9\u9762\u505a\u5f97\u5341\u5206\u597d\u3002<\/p>\n

\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4e0b\u8ff0\u7684\u547d\u4ee4<\/a>\u538b\u7f29\u4e00\u4e2a\u6587\u4ef6\uff1a<\/p>\n

\n

zip -r archive_name.zip filename    \uff08-r\u662f\u538b\u7f29\u6587\u4ef6\uff09<\/pre>\n<\/p>\n

\u4e0b\u8fb9\u662f\u5047\u5982\u89e3\u538b\u4e00\u4e2azip\u6587\u4ef6\uff1a<\/p>\n

tar\u6587\u4ef6\u89e3\u538b\u5931\u8d25linux_linux\u4e0btar\u6587\u4ef6\u89e3\u538b_linux\u600e\u4e48\u89e3\u538btar\u6587\u4ef6<\/p>\n

\n

unzip archive_name.zip              \uff08\u89e3\u538b\u6587\u4ef6\u5728\u5f53\u524d\u6587\u4ef6\u4e0b\uff09\nunzip archive_name.zip -d new_dir   \uff08\u89e3\u538b\u6587\u4ef6\u53ef\u4ee5\u5c06\u6587\u4ef6\u89e3\u538b\u7f29\u81f3\u4e00\u4e2a\u4f60\u6307\u5b9a\u7684\u7684\u76ee\u5f55\uff0c\u4f7f\u7528-d\u53c2\u6570\uff09<\/pre>\n<\/p>\n

\u4e8c\u3001tar\u683c\u5f0f<\/p>\n

tar\u662f\u5728Linux<\/a>\u4e2d\u4f7f\u7528\u5f97\u5341\u5206\u5e7f\u6cdb\u7684\u6587\u6863\u6253\u5305\u683c\u5f0f\u3002\u5b83\u7684\u7528\u5904\u5c31\u662f\u5b83\u53ea\u6d88\u8017\u5341\u5206\u5c11\u7684CPU\u4ee5\u53ca\u65f6\u95f4\u53bb\u6253\u5305\u6587\u4ef6\uff0c\u5b83\u4ec5\u4ec5\u53ea\u662f\u4e00\u4e2a\u6253\u5305\u5de5\u5177\uff0c\u5e76\u4e0d\u8d1f\u8d23\u538b\u7f29\u3002\u4e0b\u8fb9\u662f\u600e\u6837\u6253\u5305\u4e00\u4e2a\u76ee\u5f55\uff1a<\/p>\n

\n

tar -cvf archive_name.tar directory_to_compress<\/pre>\n<\/p>\n

-c\u53c2\u6570\u662f\u6784\u5efa\u65b0\u7684\u5b58\u6863<\/p>\n

tar\u6587\u4ef6\u89e3\u538b\u5931\u8d25linux_linux\u4e0btar\u6587\u4ef6\u89e3\u538b_linux\u600e\u4e48\u89e3\u538btar\u6587\u4ef6<\/p>\n

-v\u53c2\u6570\u8be6\u5c3d\u663e\u793a\u5904\u7406\u7684\u6587\u4ef6<\/p>\n

-f\u53c2\u6570\u6307\u5b9a\u5b58\u6863\u6216\u8bbe\u5907<\/p>\n

\u6253\u5305\u4ee5\u540e\u600e\u4e48\u89e3\u5305\uff1a<\/p>\n

\n

tar -xvf archive_name.tar<\/pre>\n<\/p>\n

\u524d\u9762\u8fd9\u4e2a\u89e3\u5305\u547d\u4ee4\u5c06\u4f1a\u5c06\u6587\u6863\u89e3\u5f00\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u8fb9\u3002\u5176\u5b9e\u5c0f\u578blinux\u7cfb\u7edf\uff0c\u4f60\u4e5f\u53ef\u4ee5\u7528\u4e0b\u8fb9\u7684\u8fd9\u4e2a\u547d\u4ee4\u6765\u89e3\u5305\u5230\u6307\u5b9a\u7684\u8def\u5f84\uff1a<\/p>\n

\n

tar -xvf archive_name.tar -C new_dir<\/pre>\n<\/p>\n

\u89e3\u5305\u7684\u53c2\u6570\u662f-C\uff0c\u4e0d\u662f\u5927\u5199c<\/p>\n

\u4e09\u3001tar.gz\u683c\u5f0f<\/p>\n

\u8fd9\u4e9b\u683c\u5f0f\u662f\u6211\u4f7f\u7528\u5f97\u6700\u591a\u7684\u538b\u7f29\u683c\u5f0f\u3002\u5b83\u5728\u538b\u7f29\u65f6\u4e0d\u4f1a\u5360\u7528\u592a\u591aCPU\u7684\uff0c\u5e76\u4e14\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a\u5341\u5206\u7406\u60f3\u7684\u538b\u7f29\u7387\u3002<\/p>\n

\u538b\u7f29\u65b9\u6cd5\uff1a<\/p>\n

\n

tar -zcvf archive_name.tar.gz filename<\/pre>\n<\/p>\n

\u89e3\u538b\u7f29\u5f62\u5f0f\uff1a<\/p>\n

\n

tar -zxvf archive_name.tar.gz<\/pre>\n<\/p>\n

\u524d\u9762\u8fd9\u4e2a\u89e3\u5305\u547d\u4ee4\u5c06\u4f1a\u5c06\u6587\u6863\u89e3\u5305\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u8fb9\u3002\u5176\u5b9elinux\u600e\u4e48\u89e3\u538btar\u6587\u4ef6<\/strong>\uff0c\u4f60\u4e5f\u53ef\u4ee5\u7528\u4e0b\u8fb9\u7684\u8fd9\u4e2a\u547d\u4ee4\u6765\u6307\u5b9a\u89e3\u5305\u7684\u8def\u5f84\uff1a<\/p>\n

\n

tar -zxvf archive_name.tar.gz -C new_dir<\/pre>\n<\/p>\n

\u56db\u3001tar.bz2\u683c\u5f0f<\/p>\n

\u8fd9\u4e9b\u538b\u7f29\u683c\u5f0f\u662f\u6211\u4eec\u63d0\u53ca\u7684\u6240\u6709\u5f62\u5f0f\u4e2d\u538b\u7f29\u7387\u6700\u597d\u7684\u3002\u5176\u5b9e\uff0c\u8fd9\u4e5f\u5c31\u610f\u5473\u7740LINUX\u865a\u673a\uff0c\u5b83\u6bd4\u4e0a\u9762\u7684\u65b9\u6cd5\u8981\u5360\u7528\u66f4\u591a\u7684CPU\u4e0e\u65f6\u95f4\u3002<\/p>\n

\u538b\u7f29\u65b9\u6cd5:<\/p>\n

tar\u6587\u4ef6\u89e3\u538b\u5931\u8d25linux_linux\u4e0btar\u6587\u4ef6\u89e3\u538b_linux\u600e\u4e48\u89e3\u538btar\u6587\u4ef6<\/p>\n

\n

tar -jcvf archive_name.tar.bz2 filename<\/pre>\n<\/p>\n

\u89e3\u538b\u7f29\u5f62\u5f0f\uff1a<\/p>\n

\n

tar -jxvf archive_name.tar.bz2<\/pre>\n<\/p>\n

\u524d\u9762\u8fd9\u4e2a\u89e3\u5305\u547d\u4ee4\u5c06\u4f1a\u5c06\u6587\u6863\u89e3\u5f00\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u8fb9\u3002\u5176\u5b9e\uff0c\u4f60\u4e5f\u53ef\u4ee5\u7528\u4e0b\u8fb9\u7684\u8fd9\u4e2a\u547d\u4ee4\u6765\u6307\u5b9a\u89e3\u5305\u7684\u8def\u5f84\uff1a<\/p>\n

\n

tar -jxvf archive_name.tar.bz2 -C new_dir<\/pre>\n<\/p>\n

\u63a8\u8350\u6559\u7a0b\uff1alinux\u6559\u7a0b<\/p>\n

\u4ee5\u4e0a\u5c31\u662flinux\u5982\u4f55\u89e3\u538b\u6587\u4ef6\u7684\u8be6\u5c3d\u5185\u5bb9linux\u600e\u4e48\u89e3\u538btar\u6587\u4ef6<\/strong>\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8php\u82f1\u6587\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e00\u3001zip\u683c\u5f0fzip\u53ef\u80fd\u662f\u76ee\u524d\u4f7f\u7528\u7684\u6700\u591a\u7684\u6587\u6863\u538b\u7f29\u683c\u5f0f\u3002gz\u548ctar.\u4e0b\u9762\u662f\u5982\u679c\u89e3\u538b\u4e00\u4e2azip\u6587\u4ef6\uff1a\u4e8c\u3001tar\u683c\u5f0ftar\u662f\u5728Linux\u4e2d\u4f7f\u7528\u5f97\u975e\u5e38\u5e7f\u6cdb\u7684\u6587\u6863\u6253\u5305\u683c\u5f0f\u3002-f\u53c2\u6570\u6307\u5b9a\u5b58\u6863\u6216\u8bbe\u5907\u4e0a\u9762\u8fd9\u4e2a\u89e3\u5305\u547d\u4ee4\u5c06\u4f1a\u5c06\u6587\u6863\u89e3\u5f00\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u9762\u3002\u89e3\u5305\u7684\u53c2\u6570\u662f-C\uff0c\u4e0d\u662f\u5c0f\u5199c\u4e09\u3001tar.\u4e0a\u9762\u8fd9\u4e2a\u89e3\u5305\u547d\u4ee4\u5c06\u4f1a\u5c06\u6587\u6863\u89e3\u5305\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u9762\u3002\u56db\u3001tar.bz2\u683c\u5f0f\u4e0a\u9762\u8fd9\u4e2a\u89e3\u5305\u547d\u4ee4\u5c06\u4f1a\u5c06\u6587\u6863\u89e3\u5f00\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u9762\u3002\u63a8\u8350\u6559\u7a0b\uff1alinux\u6559\u7a0b<\/p>\n","protected":false},"author":1,"featured_media":264682,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-264681","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/264681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=264681"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/264681\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/264682"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=264681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=264681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=264681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}