Between servers, the use of the remote copy command scp -r of files

Purpose:

        Copy the contents of the specified folder on server A to server B;

On the Linux side of server B, enter the following code , code format template :

        scp -r name_A@ip_A:file_A file_B 

        Example:

        Copy the contents of the /home/sd_bj/sd/model/ file on server A to the /usr/sd_bj/zsb/ file on server B;

Information about server A:

        Username: AAA

        ip:10.16.66.88

        Specify folder: /home/sd_bj/sd/model

Server B's information:

        Folder to hold content from A: /usr/sd_bj/zsb/

        The code to complete the above example is as follows, enter the following command on server B: 

scp -r [email protected]:/home/sd_bj/sd/model /usr/sd_bj/zsb/

        Runtime screen:

        Through the above method, the rapid copying of files between servers can be realized, which greatly saves the copying time!

        good luck! 

Guess you like

Origin blog.csdn.net/power_kaikaige/article/details/128347709