Simple scp memory method and simple scp memory method

Source: Internet
Author: User
Tags scp file

Simple scp memory method and simple scp memory method

Scp can only send the text view to the remote and copy files from the remote, but it is often used to mix the two functions first, so I have summarized it in plain vernacular and it is very easy to remember. Here I will share with you.
Two common features of scp:

(1) send the text view to the remote end

The absolute path of the scp file to be sent. root @ Remote Server URL: file storage path

Scp log/* zhangxl@172.168.10.7:/home/zhangxl/aaa/here because it is to send to my personal server, so change root to my personal server name,

Note: to send to the remote end, you must first know the path of the file on your machine. If you do not even know the path, how can you send it? Then, the remote host name (usually root), ip address, and path for storing files are known.

(2) copy files from the remote end

Scp (User Name) @ Remote Server URL: copy file absolute path storage path scp-r lib@172.168.10.7 :~ /Tmp /*~ /Aaa /~ /Aaa/is equivalent to/home/zhangxl/aaa/-r recursively traversing sub-Directories, you need to know the absolute path of the Host Name, ip address, and file, and then the path for storing the file.

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.