xref: /dragonfly/usr.bin/tftp/tftp.1 (revision d4ef6694)
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. 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: src/usr.bin/tftp/tftp.1,v 1.4.2.7 2002/06/21 15:29:33 charnier Exp $
30.\" $DragonFly: src/usr.bin/tftp/tftp.1,v 1.5 2007/11/23 23:16:37 swildner Exp $
31.\"
32.Dd April 18, 1994
33.Dt TFTP 1
34.Os
35.Sh NAME
36.Nm tftp
37.Nd trivial file transfer program
38.Sh SYNOPSIS
39.Nm
40.Op Ar host
41.Sh DESCRIPTION
42The
43.Nm
44utility is 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.Cm connect
56command below).
57.Sh COMMANDS
58Once
59.Nm
60is running, it issues the prompt
61.Dq Li tftp>
62and recognizes the following commands:
63.Pp
64.Bl -tag -width verbose -compact
65.It Cm \&? Ar command-name ...
66Print help information.
67.Pp
68.It Cm ascii
69Shorthand for "mode ascii"
70.Pp
71.It Cm binary
72Shorthand for "mode binary"
73.Pp
74.It Cm connect Ar host-name Op Ar port
75Set the
76.Ar host
77(and optionally
78.Ar port )
79for transfers.
80Note that the
81.Tn TFTP
82protocol, unlike the
83.Tn FTP
84protocol,
85does not maintain connections between transfers; thus, the
86.Cm connect
87command does not actually create a connection,
88but merely remembers what host is to be used for transfers.
89You do not have to use the
90.Cm connect
91command; the remote host can be specified as part of the
92.Cm get
93or
94.Cm put
95commands.
96.Pp
97.It Cm get Ar filename
98.It Cm get Ar remotename localname
99.It Cm get Ar file1 file2 ...  fileN
100Get a file or set of files from the specified
101.Ar sources .
102.Ar Source
103can be in one of two forms:
104a filename on the remote host, if the host has already been specified,
105or a string of the form
106.Ar hosts:filename
107to specify both a host and filename at the same time.
108If the latter form is used,
109the last hostname specified becomes the default for future transfers.
110.Pp
111.It Cm mode Ar transfer-mode
112Set the mode for transfers;
113.Ar transfer-mode
114may be one of
115.Em ascii
116or
117.Em binary .
118The default is
119.Em ascii .
120.Pp
121.It Cm put Ar file
122.It Cm put Ar localfile remotefile
123.It Cm put Ar file1 file2 ... fileN remote-directory
124Put a file or set of files to the specified
125remote file or directory.
126The destination
127can be in one of two forms:
128a filename on the remote host, if the host has already been specified,
129or a string of the form
130.Ar hosts:filename
131to specify both a host and filename at the same time.
132If the latter form is used,
133the hostname specified becomes the default for future transfers.
134If the remote-directory form is used, the remote host is
135assumed to be a
136.Ux
137machine.
138If you need to specify IPv6 numeric address to
139.Ar hosts ,
140wrap them using square bracket like
141.Ar [hosts]:filename
142to disambiguate the colon.
143.Pp
144.It Cm quit
145Exit
146.Nm .
147An end of file also exits.
148.Pp
149.It Cm rexmt Ar retransmission-timeout
150Set the per-packet retransmission timeout, in seconds.
151.Pp
152.It Cm status
153Show current status.
154.Pp
155.It Cm timeout Ar total-transmission-timeout
156Set the total transmission timeout, in seconds.
157.Pp
158.It Cm trace
159Toggle packet tracing.
160.Pp
161.It Cm verbose
162Toggle verbose mode.
163.El
164.Sh HISTORY
165The
166.Nm
167command appeared in
168.Bx 4.3 .
169.Sh BUGS
170Because there is no user-login or validation within
171the
172.Tn TFTP
173protocol, the remote site will probably have some
174sort of file-access restrictions in place.  The
175exact methods are specific to each site and therefore
176difficult to document here.
177.Pp
178Files larger than 33488896 octets (65535 blocks) cannot be transferred
179without client and server supporting blocksize negotiation (RFC 1783).
180