1.\" Copyright (c) 1990, 1993, 1994 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 4. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 29.\" $FreeBSD$ 30.\" 31.Dd October 1, 2003 32.Dt TFTP 1 33.Os 34.Sh NAME 35.Nm tftp 36.Nd trivial file transfer program 37.Sh SYNOPSIS 38.Nm 39.Op Ar host Op Ar port 40.Sh DESCRIPTION 41The 42.Nm 43utility is the user interface to the Internet 44.Tn TFTP 45(Trivial File Transfer Protocol), 46which allows users to transfer files to and from a remote machine. 47The remote 48.Ar host 49may be specified on the command line, in which case 50.Nm 51uses 52.Ar host 53as the default host for future transfers (see the 54.Cm connect 55command below). 56.Sh COMMANDS 57Once 58.Nm 59is running, it issues the prompt 60.Dq Li tftp> 61and recognizes the following commands: 62.Pp 63.Bl -tag -width verbose -compact 64.It Cm \&? Ar command-name ... 65Print help information. 66.Pp 67.It Cm ascii 68Shorthand for "mode ascii" 69.Pp 70.It Cm binary 71Shorthand for "mode binary" 72.Pp 73.It Cm connect Ar host Op Ar port 74Set the 75.Ar host 76(and optionally 77.Ar port ) 78for transfers. 79Note that the 80.Tn TFTP 81protocol, unlike the 82.Tn FTP 83protocol, 84does not maintain connections between transfers; thus, the 85.Cm connect 86command does not actually create a connection, 87but merely remembers what host is to be used for transfers. 88You do not have to use the 89.Cm connect 90command; the remote host can be specified as part of the 91.Cm get 92or 93.Cm put 94commands. 95.Pp 96.It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname 97.It Cm get Xo 98.Oo Ar host1 : Oc Ns Ar file1 99.Oo Ar host2 : Oc Ns Ar file2 ... 100.Oo Ar hostN : Oc Ns Ar fileN 101.Xc 102Get one or more files from the remote host. 103When using the 104.Ar host 105argument, the 106.Ar host 107will be used as default host for future transfers. 108If 109.Ar localname 110is specified, the file is stored locally as 111.Ar localname , 112otherwise the original filename is used. 113Note that it is not possible to download two files at a time, only 114one, three, or more than three files, at a time. 115.Pp 116To specify an IPv6 numeric address for a host, wrap it using square 117brackets like 118.Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file 119to disambiguate the 120colons used in the IPv6 address from the colon separating the host and 121the filename. 122.Pp 123.It Cm mode Ar transfer-mode 124Set the mode for transfers; 125.Ar transfer-mode 126may be one of 127.Em ascii 128or 129.Em binary . 130The default is 131.Em ascii . 132.Pp 133.It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename 134.It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory 135Put a file or set of files to the remote host. 136When 137.Ar remotename 138is specified, the file is stored remotely as 139.Ar remotename , 140otherwise the original filename is used. 141If the 142.Ar remote-directory 143argument is used, the remote host is assumed to be a 144.Ux 145machine. 146To specify an IPv6 numeric address for a 147.Ar host , 148see the example under the 149.Cm get 150command. 151.Pp 152.It Cm quit 153Exit 154.Nm . 155An end of file also exits. 156.Pp 157.It Cm rexmt Ar retransmission-timeout 158Set the per-packet retransmission timeout, in seconds. 159.Pp 160.It Cm status 161Show current status. 162.Pp 163.It Cm timeout Ar total-transmission-timeout 164Set the total transmission timeout, in seconds. 165.Pp 166.It Cm trace 167Toggle packet tracing. 168.Pp 169.It Cm verbose 170Toggle verbose mode. 171.El 172.Sh HISTORY 173The 174.Nm 175command appeared in 176.Bx 4.3 . 177.Sh BUGS 178Because there is no user-login or validation within 179the 180.Tn TFTP 181protocol, the remote site will probably have some 182sort of file-access restrictions in place. 183The 184exact methods are specific to each site and therefore 185difficult to document here. 186.Pp 187Files larger than 33488896 octets (65535 blocks) cannot be transferred 188without client and server supporting blocksize negotiation (RFC1783). 189