[Linux] The local and server files are uploaded and downloaded, Linux server files are uploaded and downloaded, and linux Files are uploaded.

Source: Internet
Author: User
Tags pscp scp command

[Linux] The local and server files are uploaded and downloaded, Linux server files are uploaded and downloaded, and linux Files are uploaded.

I. File Transfer in Linux and scp command instance

1. Directory replication in Linux: Local> Remote Server

Scp-r/home/abc/test1 root@192.168.0.1:/home/bcd/test2
(Local directory path remote machine username @ IP:/directory)

2. Directory replication in Linux: Remote Server-> Local Machine

Scp-r root@192.168.0.1:/home/bcd/test2/home/abc/test1
(Remote machine username @ IP:/directory local directory path)

3. Copy files in Linux: Remote Server-> Local Machine

Scp-P 22 root@192.168.0.1:/home/1.txt/home/1.txt
Note: If the port number is changed, enter "-P" after "scp" (note that "-p" is in upper case and "-P" is in lower case in ssh commands)

 

Ii. Mutual transfer between Windows and Linux, pscp command instance

(Note: There are many methods. Here we will introduce the pscp command)

Premise: Download pscp.exe and set the path environment variable.

Cmd command:

Upload:

pscp d:\upload.txt   username@192.168.1.1:/home/username/upload/upload.txt

Download:

pscp root@192.168.1.1:/home/username/download/download.txt    d:\download.txt

 

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.