Unleashed v1.4
[unleashed.git] / share / man / man1 / tftp.1
blob5a8c36cc68c6444fb06ec2761fa28a86315bf2df
1 '\" te
2 .\"  Copyright 1989 AT&T
3 .\" Copyright (C) 2007, Sun Microsystems, Inc. All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH TFTP 1 "May 7, 2007"
8 .SH NAME
9 tftp \- trivial file transfer program
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBtftp\fR [\fIhost\fR [\fIport\fR]]
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 \fBtftp\fR is the user interface to the Internet \fBTFTP\fR (Trivial File
20 Transfer Protocol), which allows users to transfer files to and from a remote
21 machine. The remote \fIhost\fR and optional \fIport\fR may be specified on the
22 command line, in which case \fBtftp\fR uses \fIhost\fR as the default host, and
23 if specified, \fIport\fR as the default port, for future transfers. See the
24 \fBconnect\fR command below.
25 .SH USAGE
26 .sp
27 .LP
28 Once \fBtftp\fR is running, it issues the prompt \fBtftp>\fR and recognizes the
29 following commands:
30 .SS "Commands"
31 .sp
32 .ne 2
33 .na
34 \fB\fBconnect\fR \fIhost-name\fR [ \fIport\fR ]\fR
35 .ad
36 .sp .6
37 .RS 4n
38 Set the \fIhost\fR, and optionally \fIport\fR, for transfers. The \fBTFTP\fR
39 protocol, unlike the \fBFTP\fR protocol, does not maintain connections between
40 transfers; thus, the \fBconnect\fR command does not actually create a
41 connection, but merely remembers what host is to be used for transfers. You do
42 not have to use the \fBconnect\fR command; the remote host can be specified as
43 part of the \fBget\fR or \fBput\fR commands.
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fB\fBmode\fR \fItransfer-mode\fR\fR
50 .ad
51 .sp .6
52 .RS 4n
53 Set the mode for transfers; \fItransfer-mode\fR may be one of \fBascii\fR or
54 \fBbinary\fR. The default is \fBascii\fR.
55 .RE
57 .sp
58 .ne 2
59 .na
60 \fB\fBput\fR \fIfilename\fR\fR
61 .ad
62 .br
63 .na
64 \fB\fBput\fR \fIlocalfile remotefile\fR\fR
65 .ad
66 .br
67 .na
68 \fB\fBput\fR \fIfilename1 filename2 .\|.\|. filenameN remote-directory\fR\fR
69 .ad
70 .sp .6
71 .RS 4n
72 Transfer a file, or a set of files, to the specified remote file or directory.
73 The destination can be in one of two forms: a filename on the remote host if
74 the host has already been specified, or a string of the form:
75 .sp
76 .in +2
77 .nf
78 \fIhost\fR\fB:\fR\fIfilename\fR
79 .fi
80 .in -2
82 to specify both a \fIhost\fR and \fIfilename\fR at the same time. If the latter
83 form is used, the specified host becomes the default for future transfers. If
84 the remote-directory form is used, the remote host is assumed to be running the
85 UNIX system.
86 .sp
87 The \fIhost\fR can be a host name (see \fBhosts\fR(4)) or an IPv4 or IPv6
88 address string (see \fBinet\fR(7P) or \fBinet6\fR(7P)). Since IPv6 addresses
89 already contain \fB":"s\fR, the \fIhost\fR should be enclosed in square
90 brackets when an IPv6 address is used. Otherwise, the first occurrence of a
91 colon will be interpreted as the separator between the \fIhost\fR and the
92 \fIfilename\fR. For example,
93 .sp
94 .in +2
95 .nf
96 [1080::8:800:200c:417A]:myfile
97 .fi
98 .in -2
100 Files may be written only if they already exist and are publicly writable. See
101 \fBin.tftpd\fR(8).
105 .ne 2
107 \fB\fBget\fR \fIfilename\fR\fR
111 \fB\fBget\fR \fIremotename localname\fR\fR
115 \fB\fBget\fR \fIfilename1 filename2 filename3\fR .\|.\|. \fIfilenameN\fR\fR
117 .sp .6
118 .RS 4n
119 Get a file or set of files (three or more) from the specified remote
120 \fIsources\fR. \fBsource\fR can be in one of two forms: a filename on the
121 remote host if the host has already been specified, or a string of the form:
123 .in +2
125 \fIhost\fR\fB:\fR\fIfilename\fR
127 .in -2
129 to specify both a host and filename at the same time. If the latter form is
130 used, the last host specified becomes the default for future transfers. See the
131 \fBput\fR command regarding specifying a \fIhost\fR.
135 .ne 2
137 \fB\fBquit\fR\fR
139 .sp .6
140 .RS 4n
141 Exit \fBtftp\fR. An \fBEOF\fR also exits.
145 .ne 2
147 \fB\fBverbose\fR\fR
149 .sp .6
150 .RS 4n
151 Toggle verbose mode.
155 .ne 2
157 \fB\fBtrace\fR\fR
159 .sp .6
160 .RS 4n
161 Toggle packet tracing.
165 .ne 2
167 \fB\fBstatus\fR\fR
169 .sp .6
170 .RS 4n
171 Show current status.
175 .ne 2
177 \fB\fBrexmt\fR\fIretransmission-timeout\fR\fR
179 .sp .6
180 .RS 4n
181 Set the per-packet retransmission timeout, in seconds.
185 .ne 2
187 \fB\fBtimeout\fR\fItotal-transmission-timeout\fR\fR
189 .sp .6
190 .RS 4n
191 Set the total transmission timeout, in seconds.
195 .ne 2
197 \fB\fBascii\fR\fR
199 .sp .6
200 .RS 4n
201 Shorthand for \fBmode ascii\fR.
205 .ne 2
207 \fB\fBbinary\fR\fR
209 .sp .6
210 .RS 4n
211 Shorthand for \fBmode binary\fR.
215 .ne 2
217 \fB\fBblksize\fR \fItransfer-blocksize\fR\fR
219 .sp .6
220 .RS 4n
221 The value of the transfer blocksize option to negotiate with the server. A
222 value of \fB0\fR disables the negotiation of this option.
226 .ne 2
228 \fB\fBsrexmt\fR \fIserver-retransmission-timeout\fR\fR
230 .sp .6
231 .RS 4n
232 The value of the retransmission timeout option to request that the server uses.
233 A value of 0 disables the negotiation of this option.
237 .ne 2
239 \fB\fBtsize\fR\fR
241 .sp .6
242 .RS 4n
243 A toggle that sends the transfer size option to the server. By default, the
244 option is not sent. The transfer size option is not sent with a \fBwrite\fR
245 request when the \fItransfer-mode\fR is \fBascii\fR.
249 .ne 2
251 \fB\fB? [\fR \fIcommand-name\fR .\|.\|. ]\fR
253 .sp .6
254 .RS 4n
255 Print help information.
258 .SH SEE ALSO
261 \fBin.tftpd\fR(8), \fBhosts\fR(4), \fBattributes\fR(5), \fBinet\fR(7P),
262 \fBinet6\fR(7P)
265 Malkin, G. and Harkin, A. \fIRFC 2347, TFTP Option Extension\fR. The Internet
266 Society. May 1998
269 Malkin, G. and Harkin, A. \fIRFC 2348, TFTP Blocksize Option\fR. The Internet
270 Society. May 1998
273 Malkin, G. and Harkin, A. \fIRFC 2349, TFTP Timeout Interval and Transfer Size
274 Options\fR. The Internet Society. May 1998
277 Sollins, K.R. \fIRFC 1350, The TFTP Protocol (Revision 2)\fR. Network Working
278 Group. July 1992.
279 .SH NOTES
282 The default \fItransfer-mode\fR is \fBascii\fR. This differs from pre-SunOS 4.0
283 and pre-4.3BSD systems, so explicit action must be taken when transferring
284 non-ASCII binary files such as executable commands.
287 Because there is no user-login or validation within the \fBTFTP\fR protocol,
288 many remote sites restrict file access in various ways. Approved methods for
289 file access are specific to each site, and therefore cannot be documented here.
292 When using the \fBget\fR command to transfer multiple files from a remote host,
293 three or more files must be specified. If two files are specified, the second
294 file is used as a local file.
297 With the default block size of \fB512\fR octets and a \fB16-\fRbit block
298 counter, some \fBTFTP\fR implementations might have problems with files over
299 \fB33,553,919\fR octets (\fB513\fR octets short of \fB32MB\fR) in size. The
300 Solaris implementation can transfer files up to \fB4GB\fR in size.
303 By default, the Solaris \fBTFTP\fR client does not enable the \fBblocksize\fR
304 or transfer size options. Setting the \fBblocksize\fR option to a higher value
305 is sometimes useful as a workaround when dealing with peers that have a
306 \fB32MB\fR limit.