TFTP

(tftp)


 

将文件传输到正在运行 TFTP 服务的远程计算机或从正在运行 TFTP 服务的远程计算机传输文件。该命令只有在安装了 TCP/IP 协议后才可以使用。

 

tftp [-i] computer [get | put] source [destination]

 

参数

 

-i 指定二进制图像传送模式(也称为八位字节)。在二进制图像模式中,文件一个字节接一个字节地逐字移动。在传送二进制文件时使用该模式。

 

如果省略了 -i,文件将以 ASCII 模式传送。这是默认的传送模式。此模式将 EOL 字符转换为 UNIX 的回车符和个人计算机的回车符/换行符。在传送文本文件时应使用此模式。如果文件传送成功,将显示数据传输率。

 

computer 指定本地或远程计算机。

 

put 将本地计算机上的文件 destination 传送到远程计算机上的文件 source

 

get 将远程计算机上的文件 destination 传送到本地计算机上的文件 source

 

如果将本地计算机上的文件 file-two 传送到远程计算机上的文件 file-one,请指定 put。如果将远程计算机上的文件file-two 传送到远程计算机上的文件 file-one,请指定 get

 

因为 tftp 协议不支持用户身份验证,所以用户必须登录,并且文件在远程计算机上必须可以写入。

 

source 指定要传送的文件。如果本地文件指定为 -,则远程文件在 stdout 上打印出来(如果获取),或从 stdin(如果放置)读取。

 

destination 指定将文件传送到的位置。如果省略了 destination,将假定与 source 同名。

 


 

Transfers files to and from a remote computer running the TFTP service.

 

TFTP [-i] host [GET | PUT] source [destination]

 

  -i              Specifies binary image transfer mode (also called octet). In binary image mode the file is moved literally, byte by byte. Use this mode when transferring binary files.

  host            Specifies the local or remote host.

  GET             Transfers the file destination on the remote host to  the file source on the local host.

  PUT             Transfers the file source on the local host to  the file destination on the remote host.

  source          Specifies the file to transfer.

  destination     Specifies where to transfer the file.