Linux local and server file mutual upload and Linux server file upload and download command writing
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!