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