]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - usr.bin/tftp/tftp.1
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / usr.bin / tftp / tftp.1
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 October 1, 2003
36 .Dt TFTP 1
37 .Os
38 .Sh NAME
39 .Nm tftp
40 .Nd "trivial file transfer program"
41 .Sh SYNOPSIS
42 .Nm
43 .Op Ar host Op Ar port
44 .Sh DESCRIPTION
45 The
46 .Nm
47 utility is the user interface to the Internet
48 .Tn TFTP
49 (Trivial File Transfer Protocol),
50 which allows users to transfer files to and from a remote machine.
51 The remote
52 .Ar host
53 may be specified on the command line, in which case
54 .Nm
55 uses
56 .Ar host
57 as the default host for future transfers (see the
58 .Ic connect
59 command below).
60 .Sh COMMANDS
61 Once
62 .Nm
63 is running, it issues the prompt
64 .Dq Li "tftp> "
65 and recognizes the following commands:
66 .Pp
67 .Bl -tag -width ".Ic verbose" -compact
68 .It Ic \&? Ar command-name ...
69 Print help information.
70 .Pp
71 .It Ic ascii
72 Shorthand for
73 .Ic mode Cm ascii .
74 .Pp
75 .It Ic binary
76 Shorthand for
77 .Ic mode Cm binary .
78 .Pp
79 .It Ic connect Ar host Op Ar port
80 Set the
81 .Ar host
82 (and optionally
83 .Ar port )
84 for transfers.
85 Note that the
86 .Tn TFTP
87 protocol, unlike the
88 .Tn FTP
89 protocol,
90 does not maintain connections between transfers; thus, the
91 .Ic connect
92 command does not actually create a connection,
93 but merely remembers what host is to be used for transfers.
94 You do not have to use the
95 .Ic connect
96 command; the remote host can be specified as part of the
97 .Ic get
98 or
99 .Ic put
100 commands.
101 .Pp
102 .It Ic get Oo Ar host : Oc Ns Ar file Op Ar localname
103 .It Ic get Xo
104 .Oo Ar host1 : Oc Ns Ar file1
105 .Oo Ar host2 : Oc Ns Ar file2 ...
106 .Oo Ar hostN : Oc Ns Ar fileN
107 .Xc
108 Get one or more files from the remote host.
109 When using the
110 .Ar host
111 argument, the
112 .Ar host
113 will be used as default host for future transfers.
114 If
115 .Ar localname
116 is specified, the file is stored locally as
117 .Ar localname ,
118 otherwise the original filename is used.
119 Note that it is not possible to download two files at a time, only
120 one, three, or more than three files, at a time.
121 .Pp
122 To specify an IPv6 numeric address for a host, wrap it using square
123 brackets like
124 .Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file
125 to disambiguate the
126 colons used in the IPv6 address from the colon separating the host and
127 the filename.
128 .Pp
129 .It Ic mode Ar transfer-mode
130 Set the mode for transfers;
131 .Ar transfer-mode
132 may be one of
133 .Cm ascii
134 or
135 .Cm binary .
136 The default is
137 .Cm ascii .
138 .Pp
139 .It Ic put Ar file Op Oo Ar host : Oc Ns Ar remotename
140 .It Ic put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory
141 Put a file or set of files to the remote host.
142 When
143 .Ar remotename
144 is specified, the file is stored remotely as
145 .Ar remotename ,
146 otherwise the original filename is used.
147 If the
148 .Ar remote-directory
149 argument is used, the remote host is assumed to be a
150 .Ux
151 machine.
152 To specify an IPv6 numeric address for a
153 .Ar host ,
154 see the example under the
155 .Ic get
156 command.
157 .Pp
158 .It Ic quit
159 Exit
160 .Nm .
161 An end of file also exits.
162 .Pp
163 .It Ic rexmt Ar retransmission-timeout
164 Set the per-packet retransmission timeout, in seconds.
165 .Pp
166 .It Ic status
167 Show current status.
168 .Pp
169 .It Ic timeout Ar total-transmission-timeout
170 Set the total transmission timeout, in seconds.
171 .Pp
172 .It Ic trace
173 Toggle packet tracing.
174 .Pp
175 .It Ic verbose
176 Toggle verbose mode.
177 .El
178 .Sh HISTORY
179 The
180 .Nm
181 command appeared in
182 .Bx 4.3 .
183 .Sh BUGS
184 Because there is no user-login or validation within
185 the
186 .Tn TFTP
187 protocol, the remote site will probably have some
188 sort of file-access restrictions in place.
189 The
190 exact methods are specific to each site and therefore
191 difficult to document here.
192 .Pp
193 Files larger than 33488896 octets (65535 blocks) cannot be transferred
194 without client and server supporting blocksize negotiation (RFC1783).