telnet Unix/Linux 并将文件下载到本地 Windows 系统

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5055649/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 02:55:49  来源:igfitidea点击:

telnet Unix/Linux and download the file to local Windows system

linux

提问by EeE

Is it possible to do so:

是否可以这样做:

I am on Windows system and telnet Unix/Linux remotely. Then I would like to download file from telnet mode and download to Windows system. Any Unix/Linux command are able to do so? like rcp or ftp. How to do so? Does it require any configuration on both system?

我在 Windows 系统和远程 telnet Unix/Linux 上。然后我想从telnet模式下载文件并下载到Windows系统。任何 Unix/Linux 命令都可以这样做?像 rcp 或 ftp。怎么做?它是否需要在两个系统上进行任何配置?

i try to write the shell script on Unix/linux side. and i telnet Unix/linux system remotely from local Windows machine and log in to Unix/linux system, run the script on Unix/linux side. some files will be transfered or download automatically to my windows system.

我尝试在 Unix/linux 端编写 shell 脚本。然后我从本地 Windows 机器远程 telnet Unix/linux 系统并登录到 Unix/linux 系统,在 Unix/linux 端运行脚本。一些文件将自动传输或下载到我的 Windows 系统。

assume permission is not a problem

假设许可不是问题

采纳答案by Oleg Pavliv

Usually people use ftp session to transfer files. If permissions is not a problem why don't you run ftp from your Windows computer?

通常人们使用 ftp 会话来传输文件。如果权限不是问题,为什么不在 Windows 计算机上运行 ftp?

You can create a windows batch script to load your file. Try something like

您可以创建一个 Windows 批处理脚本来加载您的文件。尝试类似的东西

ftp hostname
user
password
cd /path/to/file
get myfile
quit

回答by jterrace

I think you want PSCP(command line) or WinSCP(GUI).

我认为您需要PSCP(命令行)或WinSCP(GUI)。

回答by Du Song

You can use x/y/zmodem to transfer file if both ends support that.

如果两端都支持,您可以使用 x/y/zmodem 传输文件。

On Linux/Unix, you can use sz command to send file via zmodem.

在 Linux/Unix 上,您可以使用 sz 命令通过 zmodem 发送文件。

On Windows, both Secure CRT (commercial) or Le Putty (open source) are capable of zmodem.

在 Windows 上,Secure CRT(商业)或 Le Putty(开源)都支持 zmodem。

回答by Jeremiah Willcock

If you must do it through the existing connection, look at protocols such as ZMODEM and the rzand szcommands for them on Linux. You will need a terminal program on Windows that supports that protocol though.

如果必须通过现有的连接做,看看协议,如ZMODEM和rzsz在Linux命令他们。不过,您将需要一个支持该协议的 Windows 终端程序。

回答by dkantowitz

For small files, I just uuencode (or gzip -c | uuencode name.gz) on the command line over the telnet session, then cut and paste to uudecode on my local windows computer (using cygwin).

对于小文件,我只是通过 telnet 会话在命令行上执行 uuencode(或 gzip -c | uuencode name.gz),然后剪切并粘贴到本地 Windows 计算机上的 uudecode(使用 cygwin)。

回答by JAK

You can use this:

你可以使用这个:

telnet hostname 80 > filename_to_download_in
GET /path/to/file HTTP/1.0