当然,windows与linux之间文件的传输的两种方式有很多,这里就仅仅列出工作中遇到的,作为笔记;
方法一:安装SSH Secure Shell Client客户端
安装即可登录直接拖拉到linux,如果从linux下导出文件则需要如此操作
文件自动回到windows窗口的当前目录;
方法2:通过windows cmd窗口命令
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>d:
D:\>e:
step1:ftp登录
E:\>ftp 128.8.28.212
Connected to 128.8.28.212.
220 (vsFTPd 2.2.2)
User (128.8.28.212:(none)): oracle
331 Please specify the password.
Password:
230 Login successful.
step2:查看目录中的文件列表
ftp> cd wangxj
250 Directory successfully changed.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
enfo_ods.dmp
enfo_ods.log
tsubject.dmp
tsubject.log
226 Directory send OK.
ftp: 收到 56 字节,用时 0.00Seconds 56000.00Kbytes
step3:从linux当前目录下载文
ftp> get enfo_ods.dmp200 PORT command successful. Consider using PASV150 Opening BINARY mode data connection for enfo_ods.dmp (325029888 bytes)226 Transfer complete.ftp: 收到 325029888 字节,用时 27.39Seconds 11866.74Kbytes/sec.
ftp> get enfo_ods.log
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for enfo_ods.log (13704 bytes).
226 Transfer complete.
ftp: 收到 13704 字节,用时 0.00Seconds 13704000.00Kbytes/sec.
step4:从windows上传文件到linux
ftp> put test.ktr;
test.ktr;: File not found
//退出ftp 或者用bye
ftp> quit
E:\>ftp 128.8.28.212
Connected to 128.8.28.212.
220 (vsFTPd 2.2.2)
User (128.8.28.212:(none)): oracle
331 Please specify the password.
Password:
230 Login successful.
ftp> put E:\test.ktr
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 发送 23410 字节,用时 0.00Seconds 23410000.00Kbytes/sec.
ftp>
备注:
ftp是通用协议,不区分系统的。
知道linux机器的IP即可。
开始 -> 运行,输入cmd并回车,键入以下命令(前面的>为命令提示符,不用输入):
> ftp Linux机器的IP地址
> binary
> put windows系统本地文件全路径 /linux系统上的目标路径
> bye
其中,如果是文本文件,可以不用binary设置为二进制传输模式(默认文本模式,会自动转换文本格式)。如果是非文本文件(例如可执行文件),建议一定要设置为 binary 模式。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 字符编码:从基础到乱码解决