{"id":91,"date":"2010-11-28T07:01:48","date_gmt":"2010-11-28T07:01:48","guid":{"rendered":"https:\/\/shan.info\/new\/zip-%e5%8e%8b%e7%bc%a9\/"},"modified":"2010-11-28T07:01:48","modified_gmt":"2010-11-28T07:01:48","slug":"zip-%e5%8e%8b%e7%bc%a9","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/zip-%e5%8e%8b%e7%bc%a9\/","title":{"rendered":"zip \u538b\u7f29"},"content":{"rendered":"<p>\u5982\u4f55\u5728Debian\u4e0b\u521b\u5efazip\u6587\u4ef6\uff1f<br \/>zip\u8f6f\u4ef6\u5305\u53ef\u521b\u5efazip\u683c\u5f0f\u7684\u538b\u7f29\u6587\u4ef6\u3002<br \/>\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<pre class=\"bash\" style=\"font-family: monospace;\"><span style=\"color: #666666; font-style: italic;\">#aptitude install zip<\/span><\/pre>\n<p>\u00a0<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5zip [-derRF&#8230;][zipfile [file1 file2 &#8230;]]<br \/> \u57fa\u672c\u547d\u4ee4\u683c\u5f0f\u662f zip options article inpattern inpattern<br \/>article\u662f\u65b0\u7684\u6216\u5df2\u5b58\u5728\u7684zip\u6587\u4ef6\uff0cinpattern\u662f\u6587\u4ef6\u5939\u6216\u6587\u4ef6\u8def\u5f84\uff0c\u53ef\u5305\u62ec\u901a\u914d\u7b26\u3002<br \/>-d \u5220\u9664zip\u6587\u4ef6\u4e2d\u7684\u6587\u4ef6,\u5982<\/p>\n<p>\u00a0<\/p>\n<pre class=\"bash\" style=\"font-family: monospace;\"><span style=\"color: #c20cb9; font-weight: bold;\">zip<\/span> <span style=\"color: #660033;\">-d<\/span> test.zip test<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #7a0874; font-weight: bold;\">test<\/span><\/pre>\n<p>\u5c06\u5220\u9664test.zip\u6587\u4ef6\u4e2d\u7684test\/test<br \/>-e \u521b\u5efa\u5bc6\u7801\u4fdd\u62a4\u7684zip\u6587\u4ef6<br \/>-F \u4fee\u590dzip\u6587\u4ef6<br \/>-r \u9012\u5f52\u6587\u4ef6\u5939\u7ed3\u6784<br \/>-R \u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e2d\u9012\u5f52<br \/>\u4f8b\u5982\uff1a<br \/>1.\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u7684test1 test2\u6253\u5305\u4e3atest.zip\u6587\u4ef6<\/p>\n<p>\u00a0<\/p>\n<pre class=\"bash\" style=\"font-family: monospace;\"><span style=\"color: #007800;\">$zip<\/span> test.zip test1 test2<\/pre>\n<p>2.\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u6253\u5305\u4e3adata.zip,\u4e0d\u6253\u5305\u5b50\u6587\u4ef6\u5939\u3002<\/p>\n<pre class=\"bash\" style=\"font-family: monospace;\"><span style=\"color: #007800;\">$zip<\/span> data <span style=\"color: #000000; font-weight: bold;\">*<\/span><\/pre>\n<p> 3.\u5c06\u5f53\u524d\u76ee\u5f55file\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u6253\u5305\u8fdbfile.zip\u6587\u4ef6\uff0c\u9012\u5f52\u5b50\u6587\u4ef6\u5939\u3002<\/p>\n<pre class=\"bash\" style=\"font-family: monospace;\"><span style=\"color: #007800;\">$zip<\/span> <span style=\"color: #660033;\">-r<\/span> file.zip <span style=\"color: #c20cb9; font-weight: bold;\">file<\/span><\/pre>\n<p>4\uff0c\u5c06\u5f53\u524d\u6587\u4ef6\u5939\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u6253\u5305\u4e3adata.zip<\/p>\n<pre class=\"bash\" style=\"font-family: monospace;\"><span style=\"color: #007800;\">$zip<\/span> <span style=\"color: #660033;\">-R<\/span> data <span style=\"color: #000000; font-weight: bold;\">*<br \/><br \/><br \/>\u540e\u53f0\u6267\u884c<br \/><br \/>nohup zip -r -n wiki.zip wiki &amp;<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728Debian\u4e0b\u521b\u5efazip\u6587\u4ef6\uff1fzip\u8f6f\u4ef6\u5305\u53ef\u521b\u5efazip\u683c\u5f0f\u7684\u538b\u7f29\u6587\u4ef6\u3002\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a #aptitude install zip \u00a0 \u4f7f\u7528\u65b9\u6cd5zip [-derRF&#8230;][zipfile [file1 file2 &#8230;]] \u57fa\u672c\u547d\u4ee4\u683c\u5f0f\u662f zip options article inpattern inpatternarticle\u662f\u65b0\u7684\u6216\u5df2\u5b58\u5728\u7684zip\u6587\u4ef6\uff0cinpattern\u662f\u6587\u4ef6\u5939\u6216\u6587\u4ef6\u8def\u5f84\uff0c\u53ef\u5305\u62ec\u901a\u914d\u7b26\u3002-d \u5220\u9664zip\u6587\u4ef6\u4e2d\u7684\u6587\u4ef6,\u5982 \u00a0 zip -d test.zip test\/test \u5c06\u5220\u9664test.zip\u6587\u4ef6\u4e2d\u7684test\/test-e \u521b\u5efa\u5bc6\u7801\u4fdd\u62a4\u7684zip\u6587\u4ef6-F \u4fee\u590dzip\u6587\u4ef6-r \u9012\u5f52\u6587\u4ef6\u5939\u7ed3\u6784-R \u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e2d\u9012\u5f52\u4f8b\u5982\uff1a1.\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u7684test1 test2\u6253\u5305\u4e3atest.zip\u6587\u4ef6 \u00a0 $zip test.zip test1 test2 2.\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u6253\u5305\u4e3adata.zip,\u4e0d\u6253\u5305\u5b50\u6587\u4ef6\u5939\u3002 $zip data * 3.\u5c06\u5f53\u524d\u76ee\u5f55file\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u6253\u5305\u8fdbfile.zip\u6587\u4ef6\uff0c\u9012\u5f52\u5b50\u6587\u4ef6\u5939\u3002 $zip -r file.zip file 4\uff0c\u5c06\u5f53\u524d\u6587\u4ef6\u5939\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u6253\u5305\u4e3adata.zip $zip -R data *\u540e\u53f0\u6267\u884cnohup zip -r -n wiki.zip wiki &amp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}