xref: /freebsd/usr.bin/tftp/tftp.1 (revision 5521ff5a4d1929056e7ffc982fac3341ca54df7c)
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.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)tftp.1	8.2 (Berkeley) 4/18/94
33.\" $FreeBSD$
34.\"
35.Dd April 18, 1994
36.Dt TFTP 1
37.Os BSD 4.3
38.Sh NAME
39.Nm tftp
40.Nd trivial file transfer program
41.Sh SYNOPSIS
42.Nm
43.Op Ar host
44.Sh DESCRIPTION
45.Nm Tftp
46is the user interface to the Internet
47.Tn TFTP
48(Trivial File Transfer Protocol),
49which allows users to transfer files to and from a remote machine.
50The remote
51.Ar host
52may be specified on the command line, in which case
53.Nm
54uses
55.Ar host
56as the default host for future transfers (see the
57.Cm connect
58command below).
59.Sh COMMANDS
60Once
61.Nm
62is running, it issues the prompt
63.Dq Li tftp>
64and recognizes the following commands:
65.Pp
66.Bl -tag -width verbose -compact
67.It Cm \&? Ar command-name ...
68Print help information.
69.Pp
70.It Cm ascii
71Shorthand for "mode ascii"
72.Pp
73.It Cm binary
74Shorthand for "mode binary"
75.Pp
76.It Cm connect Ar host-name 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.Cm 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.Cm connect
93command; the remote host can be specified as part of the
94.Cm get
95or
96.Cm put
97commands.
98.Pp
99.It Cm get Ar filename
100.It Cm get Ar remotename localname
101.It Cm get Ar file1 file2 ...  fileN
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 Cm mode Ar transfer-mode
114Set the mode for transfers;
115.Ar transfer-mode
116may be one of
117.Em ascii
118or
119.Em binary .
120The default is
121.Em ascii .
122.Pp
123.It Cm put Ar file
124.It Cm put Ar localfile remotefile
125.It Cm 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 Cm quit
142Exit
143.Nm .
144An end of file also exits.
145.Pp
146.It Cm rexmt Ar retransmission-timeout
147Set the per-packet retransmission timeout, in seconds.
148.Pp
149.It Cm status
150Show current status.
151.Pp
152.It Cm timeout Ar total-transmission-timeout
153Set the total transmission timeout, in seconds.
154.Pp
155.It Cm trace
156Toggle packet tracing.
157.Pp
158.It Cm verbose
159Toggle verbose mode.
160.El
161.Sh BUGS
162.Pp
163Because there is no user-login or validation within
164the
165.Tn TFTP
166protocol, the remote site will probably have some
167sort of file-access restrictions in place.  The
168exact methods are specific to each site and therefore
169difficult to document here.
170.Pp
171Files larger than 33488896 octets (65535 blocks) cannot be transferred
172without client and server supporting blocksize negotiation (RFC1783).
173.Sh HISTORY
174The
175.Nm
176command appeared in
177.Bx 4.3 .
178