Linux SCP Command Detailed

Source: Internet
Author: User
Tags rsync scp command secure copy

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.