服务器与本地/服务器之间的文件传输方式很多,但是scp很实用便捷。
参考资料:
实例:
scp /K:/aaa.txt root@121.666.123.456:/home/ubuntu/data/input/
#把本地/K:/aaa.txt文件,复制到121.666.123.456IP的服务器/home/ubuntu/data/input/文件夹里
(windows用户可以在windows powershell或cmd中操作)
原理:
scp A B
#把A文件复制到B位置,本地文件可以直接写绝对路径,服务器需要加写"root@IP:"