We sometimes need to copy files between different computers, so how to quickly copy files between two computers has become a concern of many users. Today, Xiaobian teaches you how to copy files between Linux computers. Users who need it can take a look.
Solution:
Method One: Suppose now we have two servers:
(A) * .111
(B) *.222
Now we need to copy all the files in the /temp/directory on the *.111 server to the /test/directory of the *.222 server;
Then we will execute the command line. Mode:
Type the following command:
scp root@*.111:/temp//test/
#Note to enter the remote *.111 server as root, *.111 server /temp/and the following files are copied to the *.222 local server's /test/directory;
Method 2: The easiest way to copy files between two servers in Linux
The transfer file in linux has the scp command to be implemented quickly and easily. Let's take a look at the usage of the scp command and how to implement the server transfer file.
There are usually 4 ways to copy files between different Linux
1.ftp
2.samba service
3.sftp
4.scp
The above three methods are cumbersome and will not be described here. The easiest way is scp, which can be understood as the cp command under the ssh pipeline.
Copy the current file to the remote server:
scp /home/a.txt [email protected]:/home/root
Then you will be prompted to enter 192.168 The root password of .0.8 is then copied and transferred.
Copy the remote host to the current host:
scp [email protected]:/home/b.txt
Copy folder:
scp -r [email protected]:/home//root/home2
Command scp Introduction
scp Local Username@IP Address: File Name 1 Remote User Name @IP Address: File Name 2
[Local Username@IP Address:] You can enter the password corresponding to the remote username. You may need to enter the password corresponding to the remote username.
Several parameters that may be useful:
- v is the same as -v in most Linux commands. It is used to display progress. It can be used to view connection, authentication, or configuration errors.
-C Enable compression options.
-P Select port. Note that -p is already used by rcp.
-4 Force IPV4 address.
-6 Forcibly use IPV6 address.
Copy single file command:
scp file username@ip:filepath
Description:
file: The name of the file to be copied
username: the username of the remote login,
ip: remote server ip
Filepath: remote file path
The copy folder command is as follows (plus one -r parameter):
scp -r file username@ip:filepath
If you If you have two Linux, then this little trick can make it easy for you to copy files between two computers, so these users will quickly collect these two methods.
pscan2 is a hacker scanner that takes up a lot of CPU, so the Trojan should be clea
md5sum is a shell command in Linux/Unix. It can be used for file verification. For
MPI is a multi-excuses, need to build mpi environment when using Ubuntu, the following small series
in Ubuntu In Ubuntu system operation, because of the need to develop Gis application, to install Ma
How can Ubuntu users not use the sudo command?
Notes on operating online replacement files on Linux systems
Linux Ubuntu tab key auto-completion command method
Ubuntu install libgdiplus error how to do?
What should I do if I can't delete files in linux with root privileges?
Linux VirtualBox installation Win8.1 error 0x000000C4 how to do?
Linux system uses commands to print files
How to share files between Ubuntu and Windows
Linux blocking browser request alert method on browser
Ubuntu 12.04 system boot space is insufficient to delete the old kernel
How to deal with the problem of Linux system downtime
Linux system filezille file modification time is not correct how to do?
The number of Win10 app store devices has reached the upper limit. How to fix the problem?
Hard disk installation GHOST XP system tutorial [graphic tutorial]
Graphic sharing: windows 8 picture login password setting skills
Windows 8 RP Metro application software is being upgraded collectively
How to solve the problem of double-clicking IE under Win7 to enter the download page
Win8.1 Update: New changes in the upper right corner, it is really easy to shut down
The device pre-installed with Windows 10 will be delivered as soon as July 30,
Microsoft Windows XP SP2 Malformed MHT File Bypass Limit Vulnerability