如何通过 PuTTy 使用命令行将文件从 Windows 计算机上传到 Linux 计算机?
我现在在我的笔记本电脑上运行 Windows,我想将文件从我的笔记本电脑上传到我大学的通用服务器,该服务器运行 Linux 和 MacOSX。
因此,我已经使用 PuTTy 打开了与该服务器的连接。但我未能尝试使用此网站中指导的命令将文件从我的笔记本电脑上传到该服务器: http://news.metaparadigma.de/linux-upload-and-download-via-ssh-terminal-226/。似乎它只适用于 Linux 到 Linux 机器。它无法识别我输入的 Windows 路径(即 C:\a.txt)。
我该怎么做?
I'm running Windows on my laptop at the moment and I want to upload files from my laptop to my uni's general purpose server, which runs both Linux and MacOSX.
So, I already opened up a connection to that server using PuTTy. But I failed to trying to upload a file from my laptop to that server using the commands guided in this website: http://news.metaparadigma.de/linux-upload-and-download-via-ssh-terminal-226/. Seems like it only works for Linux to Linux machine. It didn't recognize the Windows path that I entered (i.e. C:\a.txt).
How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试在 Windows 上使用 SCP 传输文件,您可以从 Putty 网站下载 SCP。然后尝试运行:
有一个完整的指南在这里。
Try using SCP on Windows to transfer files, you can download SCP from Putty's website. Then try running:
There is a full length guide here.
Pscp.exe 非常慢。
使用 WinSCP 上传文件速度快了大约 10 倍。
因此,要从命令行执行此操作,首先必须将
winscp.com
文件添加到 %PATH% 中。它不是顶级域,而是一个可执行的.com
文件,位于 WinSCP 安装目录中。然后只需发出一个简单的命令,您的文件上传速度就会比 putty 快得多:
并确保您检查同步文件夹功能,这基本上就是
rsync
的作用,因此您永远不会想要再次使用 pscp.exe。Pscp.exe is painfully slow.
Uploading files using WinSCP is like 10 times faster.
So, to do that from command line, first you got to add the
winscp.com
file to your %PATH%. It's not a top-level domain, but an executable.com
file, which is located in your WinSCP installation directory.Then just issue a simple command and your file will be uploaded much faster putty ever could:
And make sure your check the synchronize folders feature, which is basically what
rsync
does, so you won't ever want to use pscp.exe again.使用 腻子。将安装目录路径放入环境值 (PATH) 中,并根据需要重新启动 PC。
打开cmd(命令提示符)并键入
它将被复制到系统。
Use putty. Put install directory path in environment values (PATH), and restart your PC if required.
Open cmd (command prompt) and type
It'll be copied to the system.
更好更快的方法,无需下载任何软件。
这应该可以。
Better and quicker approach without any software to download.
This should work.