1 .\" $NetBSD: tftp.1,v 1.18 2003/08/07 11:16:14 agc Exp $
3 .\" Copyright (c) 1990, 1993, 1994
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94
31 .\" $FreeBSD: src/usr.bin/tftp/tftp.1,v 1.20 2007/11/07 07:56:57 ru Exp $
38 .Nd "trivial file transfer program"
47 utility is the user interface to the Internet
49 (Trivial File Transfer Protocol),
50 which allows users to transfer files to and from a remote machine.
55 may be specified on the command line, in which case
61 as the default for future transfers (see the
67 argument sets a binary transfer mode as well as setting the extended options
77 is running, it issues the prompt
79 and recognizes the following commands:
81 .Bl -tag -width verbose -compact
82 .It Cm \&? Ar command-name ...
83 Print help information.
93 .It Cm blksize Ar blk-size
94 Set the tftp blksize option to
96 octets (8-bit bytes). Since the number of blocks in a tftp
100 is 65535, the default block size of 512 bytes only allows a maximum of
101 just under 32 megabytes to be transferred. The value given for
103 must be between 8 and 65464, inclusive.
104 Note that many servers will not respect this option.
106 .It Cm connect Ar host-name Op Ar port
117 does not maintain connections between transfers; thus, the
119 command does not actually create a connection,
120 but merely remembers what host is to be used for transfers.
121 You do not have to use the
123 command; the remote host can be specified as part of the
129 .It Cm get Ar filename
130 .It Cm get Ar remotename localname
131 .It Cm get Ar file1 file2 ... fileN
132 Get one or more files from the remote host.
137 will be used as default host for future transfers.
140 is specified, the file is stored locally as
142 otherwise the original filename is used.
143 Note that it is not possible to download two files at a time, only
144 one, three, or more than three files, at a time.
146 To specify an IPv6 numeric address for a host, wrap it using square
148 .Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file
150 colons used in the IPv6 address from the colon separating the host and
153 .It Cm mode Ar transfer-mode
154 Set the mode for transfers;
164 .It Cm put Ar localfile remotefile
165 .It Cm put Ar file1 file2 ... fileN remote-directory
166 Put a file or set of files to the specified
167 remote file or directory.
169 can be in one of two forms:
170 a filename on the remote host, if the host has already been specified,
171 or a string of the form
173 to specify both a host and filename at the same time.
174 If the latter form is used,
175 the hostname specified becomes the default for future transfers.
178 is specified, the file is stored remotely as
180 otherwise the original filename is used.
183 argument is used, the remote host is assumed to be a
186 To specify an IPv6 numeric address for a
188 see the example under the
195 An end of file also exits.
197 .It Cm rexmt Ar retransmission-timeout
198 Set the per-packet retransmission timeout, in seconds.
203 .It Cm timeout Ar total-transmission-timeout
204 Set the total transmission timeout, in seconds.
207 Toggle the tftp "timeout" option. If enabled, the client will pass its
208 .Ar retransmission-timeout
210 Note that many servers will not respect this option.
213 Toggle packet tracing.
216 Toggle the tftp "tsize" option. If enabled, the client will pass and
217 request the filesize of a file at the beginning of a file transfer.
218 Note that many servers will not respect this option.
228 IPv6 support was implemented by WIDE/KAME project in 1999.
229 TFTP options were implemented by Wasabi Systems, Inc., in 2003,
230 and first appeared in
232 .Sh SECURITY CONSIDERATIONS
233 Because there is no user-login or validation within
236 protocol, the remote site will probably have some
237 sort of file-access restrictions in place.
239 exact methods are specific to each site and therefore
240 difficult to document here.
242 Files larger than 33488896 octets (65535 blocks) cannot be transferred
243 without client and server supporting blocksize negotiation (RFC1783).