Linux command-SCP: remote file copy

Source: Internet
Author: User
Tags file copy scp command

SCP is similar to the normal file copy command CP, and the biggest difference between them is that the source or destination file of the SCP command is a remote file.

Command format

SCP [Options] [[user@]host1:]file1 ... [[User@]host2:] file2

Command parameters

-1
Force SCP to use protocol 1.

-2
Force SCP to use protocol 2.

-4
Force SCP to use only IPV4 addresses.

-6
Force SCP to use only IPV6 addresses.

-B
Select the batch mode.

-C
Allow compression.

-C cipher
Select cipher to encrypt the transmitted data. This option is passed directly to SSH (1).

-F Ssh_config
Specify an optional user profile for SSH. This option is passed directly to SSH (1).

-L Limit
Limits the transmission bandwidth, in units of kbit/s.

-O ssh_option
You can pass options in ssh_config configuration format to SSH.

-P Port
Specifies the port to connect to the remote host.

-P
Preserves the original file's modification time, last access time, and permission mode.

-Q
Quiet mode, ignoring warning and diagnostic information from SSH.

-R
Recursively copies the entire directory.

-S Program
Specifies the encryption program. The program must be able to understand the options for SSH (1).

-V
Redundancy mode, which prints debug information in the program.

Instance

A) Copy the redis/redis-3.0.4.tar.gz from the sugar user's home directory from the remote host 192.168.1.88 to the current directory.

SCP [email protected]:~/redis/redis-3.0.4.tar.gz. [email protected] ' s password:redis-3.0.4.tar.gz                                                                                             100% 1333KB   1.3mb/s   ls-l redis-3.0.4.tar.gz - rw-rw-r--1 Huey Huey 1364993 OCT 11:59 redis-3.0.4.tar.gz

Linux command-SCP: remote file copy

Related Article

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.