VPS discounts are not good. This Sunday morning, I will continue to record Linux common commands. We can copy it very simply in Windows. Under the linux command line, we need to use the relevant commands. Today, we will record the cp and scp commands in the memo. These are two more practical copy commands under Linux.
We can understand cp as local copy, while scp is suitable for remote copy, such as file exchange between two servers.

The scp command is a command for exchanging files between two servers. It can be divided into two aspects: copying from local to remote, or copying from remote to local.
I use a screenshot to illustrate the simplest example of the scp command, which is to copy a file from server A to server B.
scp
As shown above, this is the simplest. I downloaded a test file 100mb.test and used the scp command to copy it to the /home/wwwroot directory of another server.
The format for copying scp files is as follows: scp local username@IP address: file name remote username@IP address: file name
The above sentence "local username@IP address: file name" is because you Locally, it can be just the file name, user and IP. After the command, there is a dialog box to confirm whether to continue. After yes, enter your user password to start. You can see the progress, speed, and remaining time. and other information.
scp also has some parameters, such as -P to add a port, -C to add compression, etc.


Hong Kong/United States/Domestic High Speed ​​VPS

postid
1108

Leave a Reply