Linux server file transfer

As the title:

1. Transmission between two Linux servers

1、Xftp

    Xftp is a very convenient software. The free version can connect to two servers at the same time, so you can directly transfer files and see the progress intuitively...

    Let’s talk about the shortcomings. The local network speed of this transmission is probably not very fast, and then in case of error... it will fall short, so there are too many or too large files or transfer them in another way...

    Official website download link: https://www.netsarang.com/zh/xftp/

2, scp command

The full name of scp is secure copy, which is used for remote file copy.

PS: Both servers need to install the scp command, otherwise an error will be reported...

// 检查是否安装scp
# which scp
// 安装scp
# yum install -y openssh-clients
// 将本地文件拷贝到远程:scp 文件名 用户名@计算机IP或者计算机名称:远程路径
# scp /home/ashura/ceshi.txt [email protected]:/home/ashura/
// 从远程将文件拷回本地:scp 用户名@计算机IP或者计算机名称:文件名 本地路径
# scp [email protected]:/home/ashura/ceshi.txt /home/ashura/
// 默认是22端口,非22端口加-P
# scp -P 12306 [email protected]:/home/ashura/ceshi.txt /home/ashura/

3. The rsync command

The rsync command translates to remote synchronization, literally, it can synchronize data on both sides...

PS: rsync can be used for different folders of the machine for copying. When used for remote transmission between two servers, there is no need for another server to also install rsync... For more details, please refer to other links.

Similar to scp, add a few more parameters:

// 检查是否安装
# rpm -qa rsync
// 安装
# yum -y install rsync
// 从本地传输到远程
# rsync -avz /home/ashura [email protected]:/home/ashura
// 从远程传输到本地
# rsync -avz [email protected]:/home/ashura /home/ashura
// 默认是22端口,非22端口操作
# rsync -avz -e 'ssh -p 12360' [email protected]:/home/ashura /home/ashura

2. Transmission between Linux and Windows servers

1、Xftp

    This is the first one, intuitive

2. rz, sz commands

PS: rz means upload, directly rz enter...sz means download, sz+file name...

// 安装rz、sz命令
# yum -y install lrzsz

3. Other...

 

Other reference links:

Use scp command under Linux: https://linux.cn/article-7456-1.html

Detailed explanation of Linux rsync command usage: http://c.biancheng.net/view/6121.html

 

Guess you like

Origin blog.csdn.net/little_skeleton/article/details/115128390