For example: scp/users/kizaki/desktop/xx.mp4 [email protected]:/usr/fhome/video
There are 3 common ways to copy files between different Linux:
The first is FTP, which is one of the Linux installation FTP Server, so you can use an FTP client program to copy files.
The second method is to use Samba services, similar to the Windows file copy method to operate, relatively simple and convenient.
The third is the use of SCP commands for file replication.
The following is an introduction to the SCP replication
View SCP Help: Sup-h
The output information is as follows:
USAGE:SCP [ -12346BCEPQRV] [-C cipher] [-f ssh_config] [-I identity_file]
[-L limit] [-O ssh_option] [-P Port] [-S program]
[[Email Protected]]host1:]file1 ... [[Email Protected]]host2:]file2
OPTIONS:
-V is the same as-V in most Linux commands to show progress. Can be used to view connections, certifications, or configuration errors
-C Enable Compression option
-P Select Port
-R Copy Directory
1. Transferring files from the local to the server
SCP "Local file path" "Server user Name" @ "Server address": "Path to file on server"
scp/users/mac_pc/desktop/test.png [Email Protected]:/root
2. Transfer the folder from the local to the server
Scp-r "Path to local file" "Server User Name" @ "Server address": "Path to file on server"
Sup-r/users/mac_pc/desktop/test [Email protected]:/root
3. Transfer files on the server to local
SCP "Server user name" @ "Server address": "Path to file on server" "Path of local file"
SCP [Email Protected]:/data/wwwroot/default/111.png/users/mac_pc/desktop
4. Transfer folders on the server to local
Scp-r "Server username" @ "server address": "Path to file on server" "Path of local file"
sup-r [Email Protected]:/data/wwwroot/default/test/users/mac_pc/desktop
Use SCP command to transfer between local file and server Linux file under Mac