Annotation of src/usr.bin/tftp/tftp.1, Revision 1.5
1.5 ! aaron 1: .\" $OpenBSD: tftp.1,v 1.4 1999/06/05 01:21:43 aaron Exp $
1.1 deraadt 2: .\" $NetBSD: tftp.1,v 1.5 1995/08/18 14:45:44 pk Exp $
3: .\"
4: .\" Copyright (c) 1990, 1993, 1994
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94
36: .\"
37: .Dd April 18, 1994
38: .Dt TFTP 1
1.4 aaron 39: .Os
1.1 deraadt 40: .Sh NAME
41: .Nm tftp
42: .Nd trivial file transfer program
43: .Sh SYNOPSIS
44: .Nm tftp
45: .Op Ar host
46: .Sh DESCRIPTION
1.3 aaron 47: .Nm tftp
1.1 deraadt 48: is the user interface to the Internet
49: .Tn TFTP
50: (Trivial File Transfer Protocol),
51: which allows users to transfer files to and from a remote machine.
52: The remote
53: .Ar host
54: may be specified on the command line, in which case
55: .Nm tftp
56: uses
57: .Ar host
58: as the default host for future transfers (see the
1.3 aaron 59: .Ic connect
1.1 deraadt 60: command below).
61: .Sh COMMANDS
62: Once
63: .Nm tftp
64: is running, it issues the prompt
65: .Ql tftp>
66: and recognizes the following commands:
67: .Pp
68: .Bl -tag -width verbose -compact
1.3 aaron 69: .It Ic \&? Ar command-name Op Ar ...
1.1 deraadt 70: Print help information.
71: .Pp
1.3 aaron 72: .It Ic ascii
73: Shorthand for
74: .Ic mode ascii .
75: .Pp
76: .It Ic binary
77: Shorthand for
78: .Ic mode binary .
1.1 deraadt 79: .Pp
1.3 aaron 80: .It Ic connect Ar host Op Ar port
1.1 deraadt 81: Set the
82: .Ar host
83: (and optionally
84: .Ar port )
85: for transfers.
86: Note that the
87: .Tn TFTP
88: protocol, unlike the
89: .Tn FTP
90: protocol,
91: does not maintain connections between transfers; thus, the
1.3 aaron 92: .Ic connect
1.1 deraadt 93: command does not actually create a connection,
94: but merely remembers what host is to be used for transfers.
1.4 aaron 95: You do not have to use the
1.3 aaron 96: .Ic connect
1.1 deraadt 97: command; the remote host can be specified as part of the
1.3 aaron 98: .Ic get
1.1 deraadt 99: or
1.3 aaron 100: .Ic put
1.1 deraadt 101: commands.
102: .Pp
1.3 aaron 103: .It Ic get Ar filename
104: .It Ic get Ar remotename localname
105: .It Ic get Ar file Op Ar ...
1.1 deraadt 106: Get a file or set of files from the specified
107: .Ar sources .
1.3 aaron 108: .Ar source
1.1 deraadt 109: can be in one of two forms:
110: a filename on the remote host, if the host has already been specified,
111: or a string of the form
112: .Ar hosts:filename
113: to specify both a host and filename at the same time.
114: If the latter form is used,
115: the last hostname specified becomes the default for future transfers.
116: .Pp
1.3 aaron 117: .It Ic mode Ar transfer-mode
1.4 aaron 118: Set the mode for transfers;
1.1 deraadt 119: .Ar transfer-mode
120: may be one of
1.3 aaron 121: .Ic ascii
1.1 deraadt 122: or
1.3 aaron 123: .Ic binary .
1.1 deraadt 124: The default is
1.3 aaron 125: .Ic ascii .
1.1 deraadt 126: .Pp
1.3 aaron 127: .It Ic put Ar file
128: .It Ic put Ar localfile remotefile
129: .It Ic put Ar file1 file2 ... fileN remote-directory
1.1 deraadt 130: Put a file or set of files to the specified
131: remote file or directory.
132: The destination
133: can be in one of two forms:
134: a filename on the remote host, if the host has already been specified,
135: or a string of the form
136: .Ar hosts:filename
137: to specify both a host and filename at the same time.
138: If the latter form is used,
139: the hostname specified becomes the default for future transfers.
140: If the remote-directory form is used, the remote host is
141: assumed to be a
142: .Tn UNIX
143: machine.
144: .Pp
1.3 aaron 145: .It Ic quit
1.1 deraadt 146: Exit
147: .Nm tftp .
1.3 aaron 148: An end-of-file also exits.
1.1 deraadt 149: .Pp
1.3 aaron 150: .It Ic rexmt Ar retransmission-timeout
1.1 deraadt 151: Set the per-packet retransmission timeout, in seconds.
152: .Pp
1.3 aaron 153: .It Ic status
1.1 deraadt 154: Show current status.
155: .Pp
1.3 aaron 156: .It Ic timeout Ar total-transmission-timeout
1.1 deraadt 157: Set the total transmission timeout, in seconds.
158: .Pp
1.3 aaron 159: .It Ic trace
1.1 deraadt 160: Toggle packet tracing.
161: .Pp
1.3 aaron 162: .It Ic verbose
1.1 deraadt 163: Toggle verbose mode.
164: .El
1.5 ! aaron 165: .Sh SEE ALSO
! 166: .Xr ftp 1
! 167: .Sh HISTORY
! 168: The
! 169: .Nm
! 170: command appeared in
! 171: .Bx 4.3 .
1.1 deraadt 172: .Sh BUGS
1.3 aaron 173: Because there is no user login or validation within
1.1 deraadt 174: the
175: .Tn TFTP
176: protocol, the remote site will probably have some
1.3 aaron 177: sort of file access restrictions in place. The
1.1 deraadt 178: exact methods are specific to each site and therefore
179: difficult to document here.