[Linux] Very convenient file upload and download tools rz and sz
File upload and download tools rz and sz on linux
(This article is suitable for beginners of linux)
[Used in SecureCRT ssh]
Method 1: Install lrzsz directly using yum (recommended)
Yum install lrzsz-y
Note: after installing the rhel system, you can directly use rz sz
Usage:
1) upload files:
Rz local file name
Rz-y local file name overwrite upload
2) download an object:
Sz remotefilename
Sz-y remotefilename overwrite download
The default download path is windows download directory, and SecureCRT.
Method 2: source file Compilation Method
Install and configure lrzsz for centos x. x
Mkdir-p/usr/src/tools
Cd/home/ryan/tools
Wget http://down1.chinaunix.net/distfiles/lrzsz-0.12.20.tar.gz
Tar zxvf lrzsz-0.12.20.tar.gz
Cd lrzsz-0.12.20
./Configure -- prefix =/usr/local/lrzsz
Make
Make install
Cd/usr/bin
Ln-s/usr/local/lrzsz/bin/lrz rz
Ln-s/usr/local/lrzsz/bin/lsz sz
Rz
Method 3: rpm installation:
Rpm ivh lrzsz-x.rpm (go to the CD)
Skipped here.
Explain case: a student encountered the rz and sz upload and download problems.
Rz is normal, and sz cannot download the file to the local device. But the students are still confused.
Problem and Solution Process:
[Root @ potatoes ~] # Which sz
/Usr/bin/sz
[Root @ potatoes ~] # Ll/usr/bin/sz
Lrwxrwxrwx 1 root 24 Dec 6 2010/usr/bin/sz->/usr/local/lrzsz/bin/lrz
#==> Here we can see that sz is linked to sz->/usr/local/lrzsz/bin/lrz. It should be lsz
Export root @ potatoes ~] # Rm-f/usr/bin/sz
[Root @ potatoes ~] # Which sz
/Usr/bin/which: no sz in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin: /sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[Root @ potatoes ~] # Ll
Total 52
-Rw ------- 1 root 994 Dec 6 2010 anaconda-ks.cfg
-Rw-r -- 1 root 26403 Dec 6 2010 install. log
-Rw-r -- 1 root 4369 Dec 6 2010 install. log. syslog
[Root @ potatoes ~] # Ln-s/usr/local/lrzsz/bin/lsz/usr/bin/sz
#==> Modify link sz->/usr/local/lrzsz/bin/lsz
[Root @ potatoes ~] #/Usr/local/lrzsz/bin/lsz install. log
Rz
Zmodem transmission is starting. Press Ctrl + C to cancel.
Transmitting install. log...
100% 25 KB 25 KB/s 00:00:01 0 Error
Export root @ potatoes ~] # Ll/usr/bin/sz
Lrwxrwxrwx 1 root 24 Jun 11 08:00/usr/bin/sz->/usr/local/lrzsz/bin/lsz
[Root @ potatoes ~] # Ll
Total 52
-Rw ------- 1 root 994 Dec 6 2010 anaconda-ks.cfg
-Rw-r -- 1 root 26403 Dec 6 2010 install. log
-Rw-r -- 1 root 4369 Dec 6 2010 install. log. syslog
[Root @ potatoes ~] # Sz install. log
Rz
Zmodem transmission is starting. Press Ctrl + C to cancel.
Transmitting install. log...
100% 25 KB 25 KB/s 00:00:01 0 Error
OK.