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