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
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
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
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
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
Similarly, copy files from the local to the server:
scp/home/a.txt [Email protected]:~
Enter your password at this point
- 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