golang in Windows compiled exe is still very convenient, compile command:
go build + main文件
For this tool to write a Linux server via ssh to upload files, code address:
https://github.com/15902124763/go-scp/
git Downloads:
git clone [email protected]:15902124763/go-scp.git
golang version: 1.13
Among them, have compiled exe executable files, file address in the bin path of the project: scp.exe
Scp.exe simply copy files to the system disk C: C: \ Windows \ System32 to
Using the command:
1. scp.exe in the copy bin (can own name, it is recommended to use the default name, unless there is a conflict of command)
2 command execution
Ctrl + R, type cmd to open the Windows command line window
Spc 3. Enter the commands, such as:
scp -R D:\log\hds\data-sync-job\demo.log root@you_ip:/usr/local/src
or
scp ./demo.log root@you_ip:/usr/local/src
Description:
scp // go compile command
-R // specified local full path, the default is the current path without
D: \ log \ hds \ data-sync-job \ demo.log // local path
root // Linux server login name
you_ip // Linux server address
/ Usr / local / src // remote Linux file path, the file will be copied to the path
Such as: