Linux rz/sz上传下载命令使用方法
RZ/SZ是两个常用的文件传输命令,可以直接在SSH客户端里上传下载文件。除了平时使用方便外,某些特殊情况下还能救急,例如不能用SCP/FTP而又要上传文件以修复系统之类的场景。RZ和SZ不是Linux内置命令,需要先安装lrzsz软件才能使用。
lrzsz是一个支持XMODEM、YMODEM、ZMODEM传输协议的UNIX软件包,由早前的rzsz软件移植修改而来,具有轻便、高性能、更好安全性等特点,被广泛使用。
lrzsz 安装
对于CentOS Linux发行版系统,在软件仓库获取安装即可,安装命令:
yum install -y lrzsz
其它Linux发行版,可以手动编译安装(需先确认系统已安装有编译器相关软件)。
# 下载软件包并解压 wget https://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz tar -zxvf lrzsz-0.12.20.tar.gz && cd lrzsz-0.12.20 # 开始编译安装 ./configure && make && make install # 安装后创建命令软链接 cd /usr/bin ln -s /usr/local/bin/lrz rz ln -s /usr/local/bin/lsz sz
lrzsz 使用
rz 上传文件
上传文件只需在终端里输入rz
回车,然后在弹出窗口中选择文件上传即可(需要SSH客户端支持,Putty这种简单SSH软件用不了)。如果上传希望覆盖目录下同名文件,请用rz -y
命令。
如果上传文件稍微较大,往往会出现上传失败的情况,这时用rz -e
命令上传就可以解决。
如果上传的文件发现和原文件不一致,可能与传输方式有关,可以用rz -b
命令以二进制方式传输。
为避免上述问题,通常建议用rz -be
命令上传使用。
sz 下载文件
下载文件输入sz
命令,后面跟随要下载的文件名或文件路径。例如要下载当前目录下的test.txt文件,命令则是sz test.txt
。
下载可以结合*
通配符使用,例如下载所有.txt后缀的文件,使用sz *.txt
命令就可以了。
下载的文件在SSH客户端默认下载目录里,如要修改,请查看SSH客户端设置选项。
例如SecureCRT的设置路径为:菜单栏Options -> Session Options -> Terminal -> X/Y/Zmodem -> Directories
上面rz
提到的-b
、-e
参数也适用于sz
命令。上传/下载过程中如果需要中断,按Ctrl+C
组合键取消。
trump ownership hydroxychloroquine https://hydroxychloroquine.webbfenix.com/
hydroxychloroquine ingredient https://hhydroxychloroquine.com/
bimatoprost ophthalmic solution cost https://carepro1st.com/
ivermectin 3mg tablets for scabies https://ivermectin.mlsmalta.com/
tamoxifen citrate uses https://tamoxifen.mrdgeography.com/
aurogra vision side effects https://aurogra.buszcentrum.com/
treatment for ivermectin toxicity https://ivermectin1st.com/
power pill suhagra https://suhagra.buszcentrum.com/
generic vidalista shape https://vidalista40mg.mlsmalta.com/
cialis side effects mayo clinic https://wisig.org/
hydroxychloroquine does it cause weight loss https://hydroxychloroquinee.com/
cheap priligy pills https://ddapoxetine.com/
amstyles.com https://amstyles.com/
generic prednisone online https://prednisone.bvsinfotech.com/
price of acyclovir https://www.herpessymptomsinmen.org/productacyclovir/
cialis sample cialis sample pack https://cialis.adicbc.com/
cialis sample cialis sample pack https://cialis.confrancisyalgomas.com/
Pretty element of content. I just stumbled upon your site and in accession capital to assert that I acquire in fact loved account your weblog posts. Any way I’ll be subscribing in your feeds or even I achievement you get admission to persistently quickly.
http://www.vreyrolinomit.com/
buy hydroxychloroquine online https://hydroxychloroquinex.com/
tadalafil online – tadalafil side effects long term tadalafil pill
viagra over the counter 100mg viagra
where to buy viagra online
ed pills without a doctor prescription cheap ed pills from india
ed medicines
tadalafil tablets https://elitadalafill.com/ generic tadalafil
cheap ed pills cheap ed pills
cheap ed pills
pet meds without vet prescription canada ed pills without a doctor prescription
ed pills online
Drlwsl – ivermectin cream 5% Zibhke yegdrq
Deiccq – usa pharmacy Uyikup gqnhoa
administration of topical alprostadil https://alprostadildrugs.com/ how much alprostadil pellets cost
vardenafil 20mg https://vegavardenafil.com/ staxyn (vardenafil)
buy sildenafil online safely https://eunicesildenafilcitrate.com/ sildenafil 100
Fnhxrd – lasix 100 mg tablet Kzkoqe syncla
Nvsadl – clomid uk Occpdj kzgblm
Ssyulu – buy online cialis 5mg Nmagzf znmkgl
Svwydd – viagra generic 50mg Iwswcm rwovvp
Hcxexx – argumentative text Naxmpt mkdqfa
Jodnyl – viagra cheapest prices Iyywyv kfbyij
panmycin for sale: order terramycin
erythromycin online
Sydhyu – smu admission essay help Yoqaix dfjuio
Real nice layout and excellent subject matter, nothing else we need : D.
https://www.youtube.com/watch?v=pWwPxHlnbU8