tftp

trivial file transfer program

Syntax:

tftp [host]

Options:

host
An Internet address specified in dot notation or a hostname.

Description:

The tftp utility is the user interface to the Internet TFTP (Trivial File Transfer Protocol), which lets you transfer files to and from a remote machine. If you specify a remote host on the command line, tftp uses that host as the default host for future transfers (see the connect command below).

Commands

Once tftp is running, it issues a prompt and accepts the following commands:

? command_name...
Print help information.
ascii
Shorthand for ``mode ascii'' (see mode below).
binary
Shorthand for ``mode binary'' (see mode below).
connect host [port]
Set the host (and optionally port) for transfers. Note that the TFTP protocol, unlike FTP, doesn't maintain connections between transfers. That is, the connect command doesn't actually create a connection, but merely remembers what host to use for transfers. You don't have to use the connect command; the remote host can be specified as part of the get or put commands.
get file
get remotefile localfile
get file1 file2 ... fileN
Get a file or set of files from the specified sources. Source can be in one of two forms: a filename on the remote host (if the host has already been specified), or a string of the form hosts : filename to specify both a host and file at the same time. If the latter form is used, the last hostname specified becomes the default.
mode transfer_mode
Set the mode for transfers to either ascii or binary (default is ascii).
put file
put localfile remotefile put file1 file2 ... fileN remote_directory
Put a file or set of files to the specified remote file or directory. The destination can be in one of two forms: a filename on the remote host (if the host has already been specified), or a string of the form hosts : filename to specify both a host and file. If the latter form is used, the hostname specified becomes the default. If the remote_directory form is used, the remote host is assumed to be a Unix box.
quit
Exit tftp. An end-of-file also exits.
rexmt retransmission_timeout
Set the per-packet retransmission timeout (specified in seconds).
status
Show current status.
timeout total_transmission_timeout
Set the total transmission timeout (specified in seconds).
trace
Toggle packet tracing.
verbose
Toggle verbose mode.

Caveats:

Since there's no user-login or validation within the TFTP protocol, the remote site should have some file-access restrictions - the exact methods for implementing these vary.

See also:

ftp, tftpd