(Remote and local file transfer) in Linux, the combination of rz and sz and ssh generally means that most linux servers are remotely logged on and managed through the ssh client, after using ssh to log on to the linux host, how can we quickly interact with files on the local machine, that is, uploading and downloading files to the server and locally; two commands related to ssh can provide convenient operations: www.2cto.com sz: send the selected file to the local machine rz. Running this command will pop up a file selection window, upload the selected local file to the server (receive) rz, sz is the command line tool for ZModem file transmission in Linux/Unix and Windows. windows must support the ZModem telnet/ssh client (such as SecureCRT) to run the command rz, that is, to receive files, secureCRT will pop up the file selection dialog box. After selecting the file, close the dialog box and the file will be uploaded to the current directory.
Note: If you use rz separately, there will be two problems: the upload is interrupted, and the Upload File changes (md5 is different). The solution is to use rz-be for uploading, remove the check box before "Upload files as ASCII" in the pop-up dialog box. -B binary files are uploaded and downloaded in binary format. The characters are not interpreted as ascii-e, and all control characters of escape are forced, such as Ctrl + x, run Command sz file1 file2 such as DEL to send files to windows (the saved directory can be configured), which is much easier than ftp command, and the server no longer needs to enable FTP service PS: linux rz/sz these two gadgets install the lrzsz-x.x.xx.rpm. Of course, you can also set the Directory: www.2cto.com in SecureCRT to set the default directory for uploading and downloading options-> session options-> file transfer to set the directory for uploading and downloading
For the rest, you only need to use SecureCRT to log on to the linux terminal: send the file to the client: sz filename zmodem to receive it and start it on your own. upload files from the client to the linux Server: as long as the server executes: rz and then selects the file to send in SecureCRT, protocol zmodem -------------- introduction to the file transfer tool rz/sz (lrz/lsz) between Linux and Windows [What is rz/sz (lsz/lrz)] Simply put, these two sz/rz tools can be easily used for file transmission (sending and receiving) between Linux and Windows at a speed of about 10 kb/s, suitable for small and medium files. Rz/sz transmits data through the Zmodem protocol. [Why should we use rz/sz?] the file sharing methods between Linux and Windows mainly involve creating nfs for file sharing and tftp, but they are all very troublesome, if it is only a small file (dozens of K, hundreds of K), then directly use rz/sz, it looks very easy. For large files, we still need to consider the other sharing methods mentioned above. After all, the speed of rz/sz is only about 10 K, and it will be exhausting to upload large files...
[How to Use] (1) in Windows, use SecureCRT (or a Windows Super Terminal) to connect to the Com port to the Development Board, or connect to the Linux server through ssh or other protocols. Www.2cto.com (2) on the Linux end, after installing the rz/sz (lrz/lsz) tool (in embedded development, most of the compiled rz/sz tools have been put into rootfs, for a common Linux system, if not, you can download the source code and install it on your own.) Then you can directly run rz/sz to transfer files with Windows: a. Copy/download files from windows to Linux (Development Board): After running rz, the file selection dialog box in WIndows will pop up automatically. Select the corresponding file, add it, And then confirm, start transmission and copy the files in windows to Linux.
B. Copy files in Linux to a folder in Windows: Execute sz file_name to copy the file file_name in the current Linux folder to the corresponding directory in Windows, the Windows directory is set in your current tool. Here I use SecureCRT. Specifically, the method for changing the default path for rz upload/sz download is as follows: right-click the current session-> Session Options-> Terminal-> Xmodem/Zmodem-> Directories: Upload: path you want to set Download: the path you want to set by igaozh