Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux local and server file mutual upload and Linux server file upload and download command writing

Shulou Source: shulou.com Published: 2022-06-02 01:39:32 12月06日 Update

1. Transfer files to each other under Linux, and scp command example

1. Directory replication under Linux: local-> remote server

Scp-r / home/abc/test1 root@192.168.0.1:/home/bcd/test2 (local directory path remote user name @ IP:/ directory)

2. Directory replication under Linux: remote server-> local machine

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

3. File replication under Linux: remote server-> local machine

Scp-P 22 root@192.168.0.1:/home/1.txt / home/1.txt

Note: if the port number changes, enter:-P port number after scp (note that it is uppercase,-p is lowercase in the ssh command)

2. Windows and Linux are transmitted to each other, and examples of pscp commands

(note: there are many ways, which are introduced here through 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

Summary

The above is the editor to introduce to you the Linux local and server files and Linux server file upload and download command writing, I hope to help you, if you have any questions, please leave me a message, the editor will reply to you in time. Thank you very much for your support to the website!

Tags: Commands local machine directory server service file slogan instance user name path upload / download writing premise variable uppercase lowercase method environment question Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple MySQL Huawei vpn