linux 互传文件

在Linux系统中,互传文件通常可以使用scp (secure copy) 命令来完成。

1.从远程服务器复制文件到本地:

复制代码
scp username@remote_host:/path/to/remote/file /path/to/local/directory

2.将本地文件复制到远程服务器

复制代码
scp /path/to/local/file username@IP:/path/to/remote/directory

在这些命令中,/path/to/local/file 是你本地机器上的文件路径,username 是远程服务器上的用户名,remote_host 是远程服务器的IP地址或主机名,/path/to/remote/directory 是远程服务器上的目标目录路径。

确保你在执行这些命令时有足够的权限来访问远程服务器和本地文件系统。如果远程服务器使用的是不同的端口,你可以使用-P参数指定端口:

复制代码
scp -P port /path/to/local/file username@remote_host:/path/to/remote/directory

替换port为实际使用的端口号。

相关推荐
有谁看见我的剑了?18 分钟前
centos7.9 升级 gcc
linux
良许Linux21 分钟前
FreeRTOS大家都是怎么学的呀?
linux
良许Linux25 分钟前
类似于STM32之类的MCU,使用RTOS真的比裸机编程有那么大优势?
linux
良许Linux30 分钟前
为什么越来越多的人要转行做嵌入式呢?
linux
良许Linux35 分钟前
单片机中有FLASH为啥还需要EEROM?
linux
良许Linux37 分钟前
嵌入式rtos中哪一个更加值得去学习?
linux
良许Linux39 分钟前
为什么招聘单片机工程师的时候要求精通C/C++?
linux
良许Linux42 分钟前
程序员从幼稚到成熟的标志是什么?
linux
良许Linux1 小时前
该不该放弃嵌入式,单片机这条路?
linux
良许Linux1 小时前
stm32 用什么软件编程比较好呢?
linux