如何从windows系统向linux系统传送文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何从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 模式。
参考技术A 不用你试用php。asp。html恢复到C盘*(

Windows XP下如何使用SCP命令将文件传到局域网中的Linux机器

XP原本不支持SCP怎样才能使其支持SCP,并能用SCP命令行的方式向其它Linux机器传送文件???

写一个exe程序实现远程传输功能,然后把这个程序的执行文件名命名为scp,接着把该文件的路径添加到系统路径下面,然后在cmd里面输入scp +传送文件路径变量就行了。 参考技术A 可以在linux下开启vsftpd,开启匿名上传。XP--cmd下 ftp IP地址使用put进行上传上传的文件位置在:/var/ftp/pub(默认情况下) 参考技术B 命令基本格式:
scp [可选参数] file_source file_target

======
从 本地 复制到 远程
======
* 复制文件:
* 命令格式:
scp local_file remote_username@remote_ip:remote_folder
或者
scp local_file remote_username@remote_ip:remote_file
或者
scp local_file remote_ip:remote_folder
或者
scp local_file remote_ip:remote_file

第1,2个指定了用户名,命令执行后需要再输入密码,第1个仅指定了远程的目录,文件名字不变,第2个指定了文件名;
第3,4个没有指定用户名,命令执行后需要输入用户名和密码,第3个仅指定了远程的目录,文件名字不变,第4个指定了文件名;
* 例子:
scp /home/space/music/1.mp3 root@www.cumt.edu.cn:/home/root/others/music
scp /home/space/music/1.mp3 root@www.cumt.edu.cn:/home/root/others/music/001.mp3
scp /home/space/music/1.mp3 www.cumt.edu.cn:/home/root/others/music
scp /home/space/music/1.mp3 www.cumt.edu.cn:/home/root/others/music/001.mp3

以上是关于如何从windows系统向linux系统传送文件的主要内容,如果未能解决你的问题,请参考以下文章

文件怎么复制到虚拟机

从windows向Linux上传文件,为啥用RZ命令上传文件后,文件权限为600,而其他文件权限都为644?

linux write系统调用如何实现

如何在 Windows 和 Linux 系统上使用 Avalonia 框架处理系统关闭事件?

如何将工作空间(一个简单的项目)从 Windows 文件系统(/mnt/)移动到 linux(~/home)

能向远程主机发送cmd命令,如何使用cmd传送本机文件?