Two Linux copy files to each other

Source: Internet
Author: User

Http://jingyan.baidu.com/article/597a06434bf71e312a52436e.html

Developers often transfer files between their own computers and servers, and today's small talk about how to copy files from one another under two Linux systems.

Tools/Materials
    • Two computers with Linux systems are available in a local area network or in a wide area network.
Method/Step
    1. 1

      There are several main ways to transfer Linux files:

      1.ftp2.samba Service 3.SFTP4.SCP

      As a result of the previous 3 kinds of needs to be configured, the small part here will not say, interested in children's shoes can check the relevant information, small part of today only said SCP copy.

    2. 2

      Assuming that the computer I am currently using is a and the server is B, then we must first confirm the IP address of B. Assume that the IP of B is 192.168.2.208

    3. 3

      1, copy files from the server to local. For example, the server's home under a file is a.txt, then the command is: SCP [email protected]:/home/a.txt/home will ask you to enter the root password. You can copy the a.txt to the home of your current PC after you enter it.

    4. 4

      Did you find the law? The SCP command is: SCP Server user name @ip Address: Service side file path client save path. So, the SCP is not necessarily root, it can be other users.

    5. 5

      Similarly, copy files from the local to the server:

      scp/home/a.txt [Email protected]:~

      Enter your password at this point

    6. 6

      These are all copies of the file, so how to copy the folder containing subdirectories? It is simple to add the-r parameter, such as:

Two Linux copy files to each other

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.