SCP is a shorthand for secure copy, which is used to remotely copy files under Linux, and the SCP transfer is encrypted and may slightly affect the speed. In addition, the SCP does not account for the resources, how much system load, at this point, rsync is far less than it. Although Rsync is a bit faster than SCP, rsync can cause hard disk I/O when there are too many small files, and the SCP basically does not affect the normal use of the system
Common Command Parameters
USAGE:SCP [ -1246BCPQRV] [-C cipher] [-f ssh_config] [-I identity_file] [-L limit] [-O ssh_option] [-P port] [-S PROGR AM] [[Email Protected]]host1:]file1 ... [[Email Protected]]host2:]file2-q: quiet-r: recuersive-p: properity-v: verbose-i: identity _file "The key file used to read the transfer from the specified file, this parameter is passed directly to SSH"-P: Port
Common Command Display
An overview of the practical application of SCP commands:
Copy from the local server to the remote server:
(1) Copying files:
Command format:
SCP Local_file [Email Protected]_ip:remote_folder
Or
SCP Local_file [Email protected]_ip:remote_file
Or
SCP Local_file Remote_ip:remote_folder
Or
SCP Local_file Remote_ip:remote_file
1th, 2 Specify the user name, the command executes after the user password is entered, the 1th only specifies the remote directory, the file name is unchanged, 2nd specified the file name
3rd, 4 does not specify a user name, the command executes after entering the user name and password, the 3rd only specifies the remote directory, the file name is not changed, 4th specified the file name
(2) Copy directory:
Command format:
Scp-r Local_folder [Email protected]_ip:remote_folder
Or
Scp-r Local_folder Remote_ip:remote_folder
The 1th one specifies the user name, the command executes after the need to enter the user password;
The 2nd does not specify a user name, and a user name and password are required after the command executes
Linux SCP Command Detailed