通过 TFTP 将文件从网络设备复制到本地计算机

通过 TFTP 将文件从网络设备复制到本地计算机

网络设备(嵌入式 Linux)连接到本地计算机(Windows 操作系统)。什么是 tftp 命令,用于将二进制文件从网络设备复制到本地计算机?此外,什么是命令,用于以相反的方式将文件从本地计算机复制到网络设备?

编辑

我找到了 BusyBox tftp 命令:

BusyBox v0.61.pre (2003.02.04-12:10+0000) multi-call binary

Usage: tftp [OPTIONS] HOST [PORT]

Transfers a file from/to a tftp server

Options:
        -l FILE Local FILE.
        -r FILE Remote FILE.
        -g      Get file.
        -p      Put file.

命令:

tftp -l <local file> -r <remote file> -p <remote ip>
tftp -g -r <remote file> <remote ip>

答案1

tftp 192.168.1.1 -m binary -c put localfile remotefile 
tftp 192.168.1.1 -m binary -c get remotefile localfile

当然,您必须将 IP 地址更改为您要访问的计算机的地址。

tftp默认为 ascii,因此必须指定二进制模式,否则您将收到文件不匹配错误。

答案2

使用:

tftp -gr filename 192.168.1.1:69

从服务器获取文件。您需要设置 tftp 并启用防火墙例外。

从设备到 PC 您可以使用:

udpsvd -Ev 192.168.1.1 69 tftpd

相关内容