1.\" $OpenBSD: tftp.1,v 1.7 2003/06/03 02:56:18 millert 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 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 50may be specified on the command line, in which case 51.Nm 52uses 53.Ar host 54as the default host 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> 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 ascii . 71.Pp 72.It Ic binary 73Shorthand for 74.Ic mode 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 Ic get Ar filename 100.It Ic get Ar remotename localname 101.It Ic get Ar file Op Ar ... 102Get a file or set of files from the specified 103.Ar sources . 104.Ar source 105can be in one of two forms: 106a filename on the remote host, if the host has already been specified, 107or a string of the form 108.Ar hosts:filename 109to specify both a host and filename at the same time. 110If the latter form is used, 111the last hostname specified becomes the default for future transfers. 112.Pp 113.It Ic mode Ar transfer-mode 114Set the mode for transfers; 115.Ar transfer-mode 116may be one of 117.Ic ascii 118or 119.Ic binary . 120The default is 121.Ic ascii . 122.Pp 123.It Ic put Ar file 124.It Ic put Ar localfile remotefile 125.It Ic put Ar file1 file2 ... fileN remote-directory 126Put a file or set of files to the specified 127remote file or directory. 128The destination 129can be in one of two forms: 130a filename on the remote host, if the host has already been specified, 131or a string of the form 132.Ar hosts:filename 133to specify both a host and filename at the same time. 134If the latter form is used, 135the hostname specified becomes the default for future transfers. 136If the remote-directory form is used, the remote host is 137assumed to be a 138.Tn UNIX 139machine. 140.Pp 141.It Ic quit 142Exit 143.Nm tftp . 144An end-of-file also exits. 145.Pp 146.It Ic rexmt Ar retransmission-timeout 147Set the per-packet retransmission timeout, in seconds. 148.Pp 149.It Ic status 150Show current status. 151.Pp 152.It Ic timeout Ar total-transmission-timeout 153Set the total transmission timeout, in seconds. 154.Pp 155.It Ic trace 156Toggle packet tracing. 157.Pp 158.It Ic verbose 159Toggle verbose mode. 160.El 161.Sh SEE ALSO 162.Xr ftp 1 163.Sh HISTORY 164The 165.Nm 166command appeared in 167.Bx 4.3 . 168.Sh BUGS 169Because there is no user login or validation within 170the 171.Tn TFTP 172protocol, the remote site will probably have some 173sort of file access restrictions in place. 174The exact methods are specific to each site and therefore 175difficult to document here. 176