Use SCP command to transfer between local file and server Linux file under Mac

Source: Internet
Author: User
Tags file copy ftp client scp command

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

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.