{"id":219,"date":"2019-01-24T14:57:07","date_gmt":"2019-01-24T22:57:07","guid":{"rendered":"http:\/\/35.243.195.209\/?p=219"},"modified":"2021-04-19T19:27:48","modified_gmt":"2021-04-20T02:27:48","slug":"sz-and-rz-in-mac-os","status":"publish","type":"post","link":"https:\/\/nanzhou.cc\/index.php\/2019\/01\/24\/sz-and-rz-in-mac-os\/","title":{"rendered":"SZ and RZ on MAC OS"},"content":{"rendered":"<h2>Summary<\/h2>\n<p>In this post, I will introduce how to send files from a server to a local machine.<\/p>\n<h2>Details<\/h2>\n<h3>1. Use SCP<\/h3>\n<p>SCP is a well-known command.<\/p>\n<pre><code>scp a.zip fighternan@mydestop.com:\n<\/code><\/pre>\n<h3>2. Use Iterm and SZ&amp;RZ<\/h3>\n<ol>\n<li>Install <a href=\"http:\/\/iterm2.com\/downloads.html\">Iterm<\/a><br \/>\nIterm with tmux helps me a lot.<\/li>\n<li>Install lrzsz in the server and the desktop.<\/li>\n<\/ol>\n<pre><code>sudo brew install lrzsz\nsudo apt-get install lrzsz\n<\/code><\/pre>\n<ol>\n<li>Intall two bash files.<br \/>\n<a href=\"https:\/\/github.com\/mmastrac\/iterm2-zmodem\">Go here<\/a>.<\/li>\n<li>Add triggers.<br \/>\nOpen<\/li>\n<\/ol>\n<pre><code>iterm2 --&gt;  press 'command' and ',' (open the preference\uff09 --&gt; Profiles --&gt; Default --&gt; Advanced --&gt; Triggers Edit\n<\/code><\/pre>\n<p>Add the following two triggers\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>Regular expression<\/th>\n<th>Action<\/th>\n<th>Parameters<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>\\*\\*B0100<\/code><\/td>\n<td><code>Run Silent Coprocess<\/code><\/td>\n<td><code>\/usr\/local\/bin\/iterm2-send-zmodem.sh<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>\\*\\*B00000000000000<\/code><\/td>\n<td><code>Run Silent Coprocess<\/code><\/td>\n<td><code>\/usr\/local\/bin\/iterm2-recv-zmodem.sh<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then we are all set.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary In this post, I will introduce how to send files from a server to a local machine. Details 1. Use SCP SCP is a well-known command. scp a.zip fighternan@mydestop.com: 2. Use Iterm and SZ&amp;RZ Install Iterm Iterm with tmux helps me a lot. Install lrzsz in the server and the desktop. sudo brew install&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":5,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":1592,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions\/1592"}],"wp:attachment":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}