Linux与windows之间文件传输

简介: Linux与windows之间文件传输

Linux系统之间传输文件有很多种方法,此篇博客介绍其中的两种。也是在开发过程中经常用到的。


一般情况下,个人经常用到rz或sz命令来上传下载文件。


rz sz 上传下载

安装rz,sz,操作很简单。


yum install lrzsz

1

安装之后,就可以进行基本的上传下载操作:


通过SecureCRT执行rz,进行上传操作。


[root@iZ25ltqcjzrZ ~]# rz

1

会弹出窗口,选择上传文件,等待完成。当然rz还有一些参数,比如一般使用:


rz -bey

1

scp传输文件

由于部分服务器安全考虑,不让安装rz软件,只好使用scp传输。scp的操作命令其实很简单。


将本地文件传输的到目标服务器的指定路径下:


# 文件复制

$scp local_file remote_username@remote_ip:remote_folder

# 目录复制

$scp -r local_folder remote_username@remote_ip:remote_folder

1

2

3

4

其中local_file为本地文件,remote_username目标服务器登录名称,remote_ip目标服务器密码,remote_folder目标服务器下的目标路径。


将远程文件cp到本地:


$scp remote_username@remote_ip:remote_file local_folder

1

对比一下从本地cp到远程服务器,只是把目标和源对调了一下。


SFTP

SecureCRT可以通过快捷键Alt+p进入sftp连接模式。


下载文件


sftp>get 文件绝对路径

1

查看下载到本地的路径,得到下载到本地的路径


sftp>lpwd

1

上传文件:


sftp>put 本地文件绝对路径



目录
相关文章
|
11天前
|
安全 Linux 网络安全
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
115 2
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
|
11天前
|
JSON 安全 Linux
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
60 1
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
|
11天前
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
174 1
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
|
13天前
|
NoSQL IDE MongoDB
Studio 3T 2025.17 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.17 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
81 1
Studio 3T 2025.17 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
|
16天前
|
安全 Ubuntu Linux
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
85 4
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
|
13天前
|
安全 Linux 网络安全
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
47 0
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
|
13天前
|
安全 Linux iOS开发
SonarQube Server 2025 Release 5 (macOS, Linux, Windows) - 代码质量、安全与静态分析工具
SonarQube Server 2025 Release 5 (macOS, Linux, Windows) - 代码质量、安全与静态分析工具
85 0
SonarQube Server 2025 Release 5 (macOS, Linux, Windows) - 代码质量、安全与静态分析工具
|
13天前
|
安全 Linux iOS开发
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
116 0
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
|
2月前
|
Java Linux Apache
Apache NetBeans 27 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE
Apache NetBeans 27 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE
147 5
Apache NetBeans 27 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE
|
2月前
|
NoSQL IDE MongoDB
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
84 1
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端