{"id":5489,"date":"2023-08-07T15:00:13","date_gmt":"2023-08-07T07:00:13","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=5489"},"modified":"2023-08-07T15:00:13","modified_gmt":"2023-08-07T07:00:13","slug":"iterm2-%e4%bd%bf%e7%94%a8-zmodem-%e5%ae%9e%e7%8e%b0%e5%bf%ab%e9%80%9f%e4%bc%a0%e8%be%93%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/5489.html","title":{"rendered":"iTerm2 \u4f7f\u7528 Zmodem \u5b9e\u73b0\u5feb\u901f\u4f20\u8f93\u6587\u4ef6"},"content":{"rendered":"\n<p>=Start=<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7f18\u7531\uff1a<\/h4>\n\n\n\n<p>\u4e4b\u524d\u5728\u672c\u5730\u7535\u8111\u548cIDC\u670d\u52a1\u5668\u8fdb\u884c\u6587\u4ef6\u4f20\u8f93\u57fa\u672c\u90fd\u662f\u7528\u7684sftp\u670d\u52a1\u5668\u6765\u8fdb\u884c\u7684\u4e2d\u8f6c\uff08\u56e0\u4e3a\u4e2d\u95f4\u9700\u8981\u7ecf\u8fc7\u8df3\u677f\u673a\u5668\uff0c\u4e0d\u80fd\u76f4\u8fde\uff0c\u4e5f\u5c31\u65e0\u6cd5\u4f7f\u7528scp\u547d\u4ee4\u8fdb\u884c\u6587\u4ef6\u4f20\u8f93\uff09\uff0c\u64cd\u4f5c\u8d77\u6765\u5f88\u9ebb\u70e6\uff0c\u5c24\u5176\u662f\u6d89\u53ca\u5230\u591a\u53f0IDC\u670d\u52a1\u5668\u7684\u65f6\u5019\uff0c\u6bcf\u4e00\u53f0\u670d\u52a1\u5668\u7528sftp\u547d\u4ee4\u4e0a\u4f20\u4e0b\u8f7d\u7684\u65f6\u5019\u90fd\u9700\u8981\u8fdb\u884cssh\u767b\u5f55\uff08\u591a\u53f0\u670d\u52a1\u5668\u4e4b\u95f4\u8def\u7531\u4e0d\u901a\uff0c\u6ca1\u529e\u6cd5\u901a\u8fc7\u4e34\u65f6\u642d\u5efaSimpleHTTPServer\u670d\u52a1\u5668\u7684\u65b9\u5f0f\u5c06\u591a\u53f0\u670d\u52a1\u5668\u4e0a\u7684\u6587\u4ef6\u8fdb\u884c\u6c47\u805a\uff0c\u4ece\u800c\u51cf\u5c11\u5de5\u4f5c\u91cf\uff09\u3002\u524d\u4e24\u5929\u521a\u4e86\u89e3\u5230\u53ef\u4ee5\u7528sz\/rz\u547d\u4ee4\u8fdb\u884c\u672c\u673a\u548cIDC\u670d\u52a1\u5668\u7684\u6587\u4ef6\u4f20\u8f93\uff0c\u8bd5\u4e86\u4e00\u4e0b\u786e\u5b9e\u53ef\u4ee5\uff0c\u4e0d\u8fc7\u8fd8\u662f\u5f88\u597d\u5947\u539f\u7406\u662f\u4ec0\u4e48\uff0c\u8fd9\u91cc\u7b80\u5355\u8bb0\u5f55\u4e00\u4e0bsz\/rz\u547d\u4ee4\u7684\u73af\u5883\u642d\u5efa\u6b65\u9aa4\u548c\u4f7f\u7528\u65b9\u6cd5\uff0c\u65b9\u4fbf\u540e\u9762\u53c2\u8003\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b63\u6587\uff1a<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n\n\n\n<p>iTerm2 \u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u7ec8\u7aef\u5de5\u5177\uff0c\u800c Zmodem \u5219\u662f\u4e00\u79cd\u7528\u4e8e\u5728\u7ec8\u7aef\u4e2d\u5b89\u5168\u5730\u4f20\u8f93\u6587\u4ef6\u7684\u534f\u8bae\u3002\u4e3a\u4e86\u5728 iTerm2 \u4e2d\u4f7f\u7528 Zmodem\uff0c\u60a8\u9700\u8981\u5728\u672c\u5730\u5b89\u88c5 lrzsz \u5de5\u5177\uff0c\u5e76\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u76f8\u5173\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u5ba2\u6237\u7aef\u914d\u7f6e\uff08\u672c\u5730macOS\u7cfb\u7edf\uff09<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>1. \u5b89\u88c5 lrzsz\n\nbrew install lrzsz\n\n2. \u4e0b\u8f7d\u5e76\u4fdd\u5b58\u5524\u8d77 iTerm2 \u8c03\u7528sz\/rz\u547d\u4ee4\u7684\u811a\u672c\n\nwget https:\/\/raw.githubusercontent.com\/robberphex\/iTerm2-zmodem\/master\/iterm2-send-zmodem.sh\nwget https:\/\/raw.githubusercontent.com\/robberphex\/iTerm2-zmodem\/master\/iterm2-recv-zmodem.sh\nchmod +x iterm2-send-zmodem.sh iterm2-recv-zmodem.sh\ncp iterm2-send-zmodem.sh iterm2-recv-zmodem.sh \/usr\/local\/bin\/\n\n3. \u914d\u7f6e iTerm2 \u4e0a\u7684\u89e6\u53d1\u5668\n\n\u6253\u5f00 iTerm2 \uff0c\u70b9\u51fb Settings \u2192 Preferences(command+,) \u2192 Profiles \u9009\u62e9\u6307\u5b9a\u7684 Profile(\u4e00\u822c\u5c31\u662f\u9ed8\u8ba4\u7684Default)\u3002\u7136\u540e\u7ee7\u7eed\u9009\u62e9 Advanced \u2192 Triggers\uff0c\u5e76\u70b9\u51fb Edit \u6dfb\u52a0\u4e24\u4e2a\u89e6\u53d1\u5668\u3002\n\n    Regular expression: rz waiting to receive.\\*\\*B0100\n    Action: Run Silent Coprocess\n    Parameters: \/usr\/local\/bin\/iterm2-send-zmodem.sh\n    Instant: checked\n\n    Regular expression: \\*\\*B00000000000000\n    Action: Run Silent Coprocess\n    Parameters: \/usr\/local\/bin\/iterm2-recv-zmodem.sh\n    Instant: checked\n\n\u914d\u7f6e\u8fd9\u4e24\u4e2a\u89e6\u53d1\u5668\u7684\u4f5c\u7528\u5c31\u662f\u8ba9 iTerm2 \u6839\u636e\u7ec8\u7aef\u4e0a\u663e\u793a\u7684\u5b57\u7b26\u901a\u8fc7\u6307\u5b9a\u7684\u89e6\u53d1\u5668\u8c03\u7528\u76f8\u5e94\u7684\u53d1\u9001\u548c\u63a5\u6536\u811a\u672c\u3002<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u670d\u52a1\u7aef\u914d\u7f6e<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>lrzsz \u8f6f\u4ef6\u5305\u662f \u652f\u6301 Zmodem \u534f\u8bae\u7684\u5de5\u5177\u5305\u3002 \u5176\u5305\u542b\u7684 rz\u3001sz \u547d\u4ee4\u662f\u901a\u8fc7 ZModem \u534f\u8bae\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u548c\u7ec8\u7aef\u673a\u5668\u95f4\u4e0a\u4f20\u4e0b\u8f7d\u6587\u4ef6\u7684\u5229\u5668\u3002\n\n\u4e3a\u4e86\u6b63\u786e\u901a\u8fc7 sz\u3001rz \u547d\u4ee4\u4f20\u8f93\u6587\u4ef6\uff0c\u670d\u52a1\u7aef\u9700\u8981\u5b89\u88c5 lrzsz \u8f6f\u4ef6\u5305\u7684\u3002\n\nyum install lrzsz\napt-get install lrzsz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u4f7f\u7528 sz\/rz \u547d\u4ee4\u4f20\u8f93\u6587\u4ef6<\/h3>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fd0000\" class=\"has-inline-color\">sz\/rz \u7684\u547d\u4ee4\u90fd\u662f\u5728IDC\u7684Linux\u670d\u52a1\u5668(<strong>\u8fdc\u7aef\u670d\u52a1\u5668<\/strong>)\u4e0a\u6267\u884c\u7684\uff0c\u8fd9\u4e2a\u8981\u6ce8\u610f\u3002<\/mark><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728\u8fdc\u7aef\u670d\u52a1\u5668\u4e0a<strong>\u53d1\u9001\u6587\u4ef6\u5230\u672c\u5730\u7535\u8111<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728<strong>\u8fdc\u7aef\u670d\u52a1\u5668<\/strong>\u4e0a\u6267\u884c sz filename1 filename2\u2026filenameN \u547d\u4ee4<\/li>\n\n\n\n<li>\u672c\u5730\u9009\u62e9\u76ee\u5f55\u4fdd\u5b58<\/li>\n\n\n\n<li>\u7b49\u5f85\u4f20\u8f93\u5373\u53ef<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728\u8fdc\u7aef\u670d\u52a1\u5668\u4e0a<strong>\u63a5\u6536\u6765\u81ea\u672c\u5730\u7535\u8111\u7684\u6587\u4ef6<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728<strong>\u8fdc\u7aef\u670d\u52a1\u5668<\/strong>\u4e0a\u6267\u884c rz \u547d\u4ee4<\/li>\n\n\n\n<li>\u672c\u5730\u9009\u62e9\u6587\u4ef6\u4f20\u8f93<\/li>\n\n\n\n<li>\u7b49\u5f85\u4f20\u8f93\u5373\u53ef<\/li>\n<\/ul>\n\n\n\n<p>\u8865\u5145\u8bf4\u660e\uff1a<br>rz\u4e0esz\u53ea\u9002\u5408\u5c0f\u7684\u6587\u4ef6\u4f20\u8f93\uff0c\u5927\u6587\u4ef6\u8fd8\u662f\u4f7f\u7528sftp\u7b49\u5de5\u5177\u8fdb\u884c\u4f20\u8f93\uff1b<br>\u53ea\u80fd\u4f20\u8f93\u6587\u4ef6\uff0c\u800c\u4e0d\u80fd\u4f20\u8f93\u6587\u4ef6\u5939\uff1b<br>\u4e0d\u662f\u6240\u6709\u5de5\u5177\u90fd\u652f\u6301rz\u4e0esz\uff0c\u5fc5\u987b\u652f\u6301ZModem\u534f\u8bae\u624d\u884c\uff0c\u4f8b\u5982Putty\u4e0d\u80fd\u4f7f\u7528rz\u4e0esz\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n\n\n\n<p>iTerm2 \u5b9e\u73b0 ssh \u81ea\u52a8\u767b\u5f55\uff0c\u5e76\u4f7f\u7528 Zmodem \u5b9e\u73b0\u5feb\u901f\u4f20\u8f93\u6587\u4ef6<br><a href=\"https:\/\/icloudnative.io\/posts\/iterm2-auto-login\/\">https:\/\/icloudnative.io\/posts\/iterm2-auto-login\/<\/a><\/p>\n\n\n\n<p>\u5728 iTerm2 \u4e2d\u4f7f\u7528 Zmodem \u5b9e\u73b0\u5feb\u901f\u4f20\u8f93\u6587\u4ef6<br><a href=\"https:\/\/www.hi-linux.com\/posts\/9916.html\">https:\/\/www.hi-linux.com\/posts\/9916.html<\/a><\/p>\n\n\n\n<p>Triggers<br><a href=\"https:\/\/iterm2.com\/documentation-triggers.html\">https:\/\/iterm2.com\/documentation-triggers.html<\/a><\/p>\n\n\n\n<p>\u5728iTerm2\u4e2d\u4f7f\u7528Zmodem\u4f20\u8f93\u6587\u4ef6<br><a href=\"http:\/\/codelife.me\/blog\/2013\/03\/02\/zmodem-integration-for-iterm2\/\">http:\/\/codelife.me\/blog\/2013\/03\/02\/zmodem-integration-for-iterm2\/<\/a><\/p>\n\n\n\n<p>macOS\u4e0b\u4f7f\u7528ZMODEM\u534f\u8bae\u4e0a\u4f20\/\u4e0b\u8f7d\u6587\u4ef6<br><a href=\"https:\/\/robberphex.com\/use-zmodem-at-macos\/\">https:\/\/robberphex.com\/use-zmodem-at-macos\/<\/a><\/p>\n\n\n\n<p>iTerm2-zmodem<br><a href=\"https:\/\/github.com\/RobberPhex\/iTerm2-zmodem\">https:\/\/github.com\/RobberPhex\/iTerm2-zmodem<\/a><\/p>\n\n\n\n<p>\u5728 Mac \u4e0b\uff0c\u5b9e\u73b0\u4e0e\u670d\u52a1\u5668\u8fdb\u884c\u4fbf\u6377\u7684\u6587\u4ef6\u4e0a\u4f20\u548c\u4e0b\u8f7d\u64cd\u4f5c<br><a href=\"https:\/\/github.com\/aikuyun\/iterm2-zmodem\">https:\/\/github.com\/aikuyun\/iterm2-zmodem<\/a><\/p>\n\n\n\n<p>\u6587\u4ef6\u4f20\u8f93\u547d\u4ee4 rz \u4e0e sz \u5b89\u88c5\u4e0e\u4f7f\u7528<br><a href=\"https:\/\/mp.weixin.qq.com\/s\/Zy1AGsM5rMJH9ngrfB1x1A\">https:\/\/mp.weixin.qq.com\/s\/Zy1AGsM5rMJH9ngrfB1x1A<\/a><\/p>\n\n\n\n<p>\u6bcf\u5929\u4e00\u4e2a Linux \u547d\u4ee4\uff0869\uff09\uff1arz\u3001sz\u547d\u4ee4<br><a href=\"https:\/\/mp.weixin.qq.com\/s\/b1EwbhsSRGY7KG5oPrrrvA\">https:\/\/mp.weixin.qq.com\/s\/b1EwbhsSRGY7KG5oPrrrvA<\/a><\/p>\n\n\n\n<p>ZMODEM<br><a href=\"https:\/\/zh.wikipedia.org\/wiki\/ZMODEM\">https:\/\/zh.wikipedia.org\/wiki\/ZMODEM<\/a><br><a href=\"https:\/\/en.wikipedia.org\/wiki\/ZMODEM\">https:\/\/en.wikipedia.org\/wiki\/ZMODEM<\/a><\/p>\n\n\n\n<p>iterm2 \u5b89\u88c5zmodem\u9047\u5230\u7684\u95ee\u9898<br><a href=\"https:\/\/juejin.cn\/s\/iterm2%20%E5%AE%89%E8%A3%85zmodem%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98\">https:\/\/juejin.cn\/s\/iterm2%20%E5%AE%89%E8%A3%85zmodem%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98<\/a><\/p>\n\n\n\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u4e4b\u524d\u5728\u672c\u5730\u7535\u8111\u548cIDC\u670d\u52a1\u5668\u8fdb\u884c\u6587\u4ef6\u4f20\u8f93\u57fa\u672c\u90fd\u662f\u7528\u7684sftp\u670d\u52a1\u5668\u6765\u8fdb\u884c\u7684\u4e2d\u8f6c\uff08\u56e0\u4e3a\u4e2d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,12],"tags":[643,30,1780,1996,1995,104],"class_list":["post-5489","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-tools","tag-iterm2","tag-linux","tag-macos","tag-rz","tag-sz","tag-windows"],"views":3615,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=5489"}],"version-history":[{"count":1,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5489\/revisions"}],"predecessor-version":[{"id":5490,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5489\/revisions\/5490"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=5489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=5489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=5489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}