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