{"id":486,"date":"2019-11-02T02:16:39","date_gmt":"2019-11-01T18:16:39","guid":{"rendered":"http:\/\/www.mustenaka.cn\/?p=486"},"modified":"2019-11-02T02:16:39","modified_gmt":"2019-11-01T18:16:39","slug":"xshelluploadfile","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2019\/11\/02\/xshelluploadfile\/","title":{"rendered":"\u901a\u8fc7Xshell\u4e0a\u4f20\u6587\u4ef6"},"content":{"rendered":"<p>\u5728\u5bf9\u670d\u52a1\u5668\u8fdb\u884c\u7ef4\u62a4\u7684\u65f6\u5019\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u8fdb\u884c\u4f20\u6587\u4ef6\uff0c\u8fd9\u91cc\u4ecb\u7ecd\u4e00\u4e2aWINDOWS\u4e0eLINUX\u8fdb\u884c\u6587\u4ef6\u4e92\u4f20\u7684\u65b9\u6cd5\u2014\u2014\u4f7f\u7528lrzsz\u4f20\u8f93<!--more--><\/p>\n<blockquote><p>\u5b9e\u73b0\u8bf4\u660e\uff1alrzsz\u4e0d\u9002\u5408\u4f20\u8f93\u5927\u6587\u4ef6\uff0c\u53ea\u9002\u5408\u4f20\u8f93\u4ee3\u7801\u7ea7\u522b\u7684\u5c0f\u6587\u4ef6<\/p><\/blockquote>\n<p>Windows\u7aef\u5df2\u7ecf\u5b89\u88c5Xshell\uff0c\u901a\u8fc7Xshell\u4f7f\u7528ssh\u767b\u9646\u8fdc\u7aef\u7684Linux\u670d\u52a1\u5668\uff0c\u9996\u5148\u67e5\u770b\u662f\u5426\u5df2\u7ecf\u5b89\u88c5lrzsz<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u8f93\u5165\r\nrpm -qa lrzsz<\/code><\/pre>\n<p>\u65e0\u8f93\u51fa\u8868\u793a\u672a\u5b89\u88c5\uff0c\u63a5\u4e0b\u6765\u8f93\u5165\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#Ubuntu\u7cfb\u5217\r\nsudo apt-get install lrzsz\r\n#Centos\u7cfb\u5217\r\nsudo yum -y install lrzsz\r\n#\u6ce8\uff1a-y\u8868\u793a\u9ed8\u8ba4Yes\uff0c\u53ef\u4ee5\u53bb\u6389-y<\/code><\/pre>\n<h2>1.\u4e0a\u4f20\u6587\u4ef6\uff08Windows\u5230Linux\uff09<\/h2>\n<p>\u4e4b\u540e\u8f93\u5165rz &#8211;help\u67e5\u770b\u547d\u4ee4\u63d0\u793a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">[root@VM_0_7_centos html]# rz --help\r\nrz version 0.12.20\r\nUsage: rz [options] [filename.if.xmodem]\r\nReceive files with ZMODEM\/YMODEM\/XMODEM protocol\r\n    (X) = option applies to XMODEM only\r\n    (Y) = option applies to YMODEM only\r\n    (Z) = option applies to ZMODEM only\r\n  -+, --append                append to existing files\r\n  -a, --ascii                 ASCII transfer (change CR\/LF to LF)\r\n  -b, --binary                binary transfer\r\n  -B, --bufsize N             buffer N bytes (N==auto: buffer whole file)\r\n  -c, --with-crc              Use 16 bit CRC (X)\r\n  -C, --allow-remote-commands allow execution of remote commands (Z)\r\n  -D, --null                  write all received data to \/dev\/null\r\n      --delay-startup N       sleep N seconds before doing anything\r\n  -e, --escape                Escape control characters (Z)\r\n  -E, --rename                rename any files already existing\r\n      --errors N              generate CRC error every N bytes (debugging)\r\n  -h, --help                  Help, print this usage message\r\n  -m, --min-bps N             stop transmission if BPS below N\r\n  -M, --min-bps-time N          for at least N seconds (default: 120)\r\n  -O, --disable-timeouts      disable timeout code, wait forever for data\r\n      --o-sync                open output file(s) in synchronous write mode\r\n  -p, --protect               protect existing files\r\n  -q, --quiet                 quiet, no progress reports\r\n  -r, --resume                try to resume interrupted file transfer (Z)\r\n  -R, --restricted            restricted, more secure mode\r\n  -s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds\r\n  -S, --timesync              request remote time (twice: set local time)\r\n      --syslog[=off]          turn syslog on or off, if possible\r\n  -t, --timeout N             set timeout to N tenths of a second\r\n  -u, --keep-uppercase        keep upper case filenames\r\n  -U, --unrestrict            disable restricted mode (if allowed to)\r\n  -v, --verbose               be verbose, provide debugging information\r\n  -w, --windowsize N          Window is N bytes (Z)\r\n  -X  --xmodem                use XMODEM protocol\r\n  -y, --overwrite             Yes, clobber existing file if any\r\n      --ymodem                use YMODEM protocol\r\n  -Z, --zmodem                use ZMODEM protocol\r\n<\/code><\/pre>\n<p>\u76f4\u63a5\u8f93\u5165\u547d\u4ee4\uff1arz\u5373\u53ef\u4eceWindows\u4e0a\u4f20\u6587\u4ef6\u5230Linux\u4e2d<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">rz\r\n#\u6216\u8005\u9700\u8981\u8986\u76d6\u7684\u8bddrz -y<\/code><\/pre>\n<h2>2.\u4e0b\u8f7d\u6587\u4ef6\uff08Linux\u5230Windows\uff09<\/h2>\n<p>\u8f93\u5165 sz &lt;\u6587\u4ef6\u540d&gt; \u5373\u53ef\u76f4\u63a5\u4eceLinux\u4e0b\u8f7d\u6587\u4ef6\u4e0b\u6765\uff0c\u6ce8\u610f\u76f4\u63a5\u8f93\u5165\u6587\u4ef6\u540d\u662f\u5f53\u524d\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u8f93\u5165\u7edd\u5bf9\u8def\u5f84\u8fdb\u884c\u4f20\u8f93<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">sz<\/code><\/pre>\n<p>\u8f93\u5165sz &#8211;help\u67e5\u770b\u547d\u4ee4\u7ec6\u5219<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">[root@VM_0_7_centos code]# sz --help\r\nsz version 0.12.20\r\nUsage: sz [options] file ...\r\n   or: sz [options] -{c|i} COMMAND\r\nSend file(s) with ZMODEM\/YMODEM\/XMODEM protocol\r\n    (X) = option applies to XMODEM only\r\n    (Y) = option applies to YMODEM only\r\n    (Z) = option applies to ZMODEM only\r\n  -+, --append                append to existing destination file (Z)\r\n  -2, --twostop               use 2 stop bits\r\n  -4, --try-4k                go up to 4K blocksize\r\n      --start-4k              start with 4K blocksize (doesn't try 8)\r\n  -8, --try-8k                go up to 8K blocksize\r\n      --start-8k              start with 8K blocksize\r\n  -a, --ascii                 ASCII transfer (change CR\/LF to LF)\r\n  -b, --binary                binary transfer\r\n  -B, --bufsize N             buffer N bytes (N==auto: buffer whole file)\r\n  -c, --command COMMAND       execute remote command COMMAND (Z)\r\n  -C, --command-tries N       try N times to execute a command (Z)\r\n  -d, --dot-to-slash          change '.' to '\/' in pathnames (Y\/Z)\r\n      --delay-startup N       sleep N seconds before doing anything\r\n  -e, --escape                escape all control characters (Z)\r\n  -E, --rename                force receiver to rename files it already has\r\n  -f, --full-path             send full pathname (Y\/Z)\r\n  -i, --immediate-command CMD send remote CMD, return immediately (Z)\r\n  -h, --help                  print this usage message\r\n  -k, --1k                    send 1024 byte packets (X)\r\n  -L, --packetlen N           limit subpacket length to N bytes (Z)\r\n  -l, --framelen N            limit frame length to N bytes (l&gt;=L) (Z)\r\n  -m, --min-bps N             stop transmission if BPS below N\r\n  -M, --min-bps-time N          for at least N seconds (default: 120)\r\n  -n, --newer                 send file if source newer (Z)\r\n  -N, --newer-or-longer       send file if source newer or longer (Z)\r\n  -o, --16-bit-crc            use 16 bit CRC instead of 32 bit CRC (Z)\r\n  -O, --disable-timeouts      disable timeout code, wait forever\r\n  -p, --protect               protect existing destination file (Z)\r\n  -r, --resume                resume interrupted file transfer (Z)\r\n  -R, --restricted            restricted, more secure mode\r\n  -q, --quiet                 quiet (no progress reports)\r\n  -s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds\r\n      --tcp                   build a TCP connection to transmit files\r\n      --tcp-server            open socket, wait for connection\r\n  -u, --unlink                unlink file after transmission\r\n  -U, --unrestrict            turn off restricted mode (if allowed to)\r\n  -v, --verbose               be verbose, provide debugging information\r\n  -w, --windowsize N          Window is N bytes (Z)\r\n  -X, --xmodem                use XMODEM protocol\r\n  -y, --overwrite             overwrite existing files\r\n  -Y, --overwrite-or-skip     overwrite existing files, else skip\r\n      --ymodem                use YMODEM protocol\r\n  -Z, --zmodem                use ZMODEM protocol<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5f97\u51fa\u6709\u975e\u5e38\u591a\u7684\u683c\u5f0f\u529f\u80fd\u8bf4\u660e\u8fd9\u4e2a\u8f6f\u4ef6\u8fd8\u662f\u5f88\u5f3a\u5927\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5bf9\u670d\u52a1\u5668\u8fdb\u884c\u7ef4\u62a4\u7684\u65f6\u5019\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u8fdb\u884c\u4f20\u6587\u4ef6\uff0c\u8fd9\u91cc\u4ecb\u7ecd\u4e00\u4e2aWINDOWS\u4e0eLINUX\u8fdb\u884c\u6587\u4ef6\u4e92\u4f20 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[8],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-linux","tag-blog"],"views":2791,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":1,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/486\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}