add -a option, minor cleanups
[unix-history] / usr / src / usr.bin / tftp / tftp.1
CommitLineData
860c68d3
KB
1.\" Copyright (c) 1986 The Regents of the University of California.
2.\" All rights reserved.
8181728d 3.\"
860c68d3
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
8181728d 15.\"
860c68d3
KB
16.\" @(#)tftp.1 5.3 (Berkeley) %G%
17.\"
18.TH TFTP 1 ""
8181728d 19.UC 6
b28a081b
JL
20.SH NAME
21tftp \- trivial file transfer program
22.SH SYNOPSIS
23.B tftp
24[
25host
26]
27.SH DESCRIPTION
28.I Tftp
29is the user interface to the Internet TFTP
30(Trivial File Transfer Protocol),
31which allows users to transfer files to and from a remote machine.
32The remote
33.I host
34may be specified on the command line, in which case
35.I tftp
36uses
37.I host
38as the default host for future transfers (see the
39.B connect
40command below).
41.SH COMMANDS
42Once
43.I tftp
44is running, it issues the prompt
45.B tftp>
46and recognizes the following commands:
47.TP
48\fBconnect\fP \fIhost-name\fP [ \fIport\fP ]
49Set the
50.I host
51(and optionally
52.IR port )
53for transfers.
54Note that the TFTP protocol, unlike the FTP protocol,
55does not maintain connections betweeen transfers; thus, the
56.I connect
57command does not actually create a connection,
58but merely remembers what host is to be used for transfers.
59You do not have to use the
60.I connect
61command; the remote host can be specified as part of the
62.I get
63or
64.I put
65commands.
66.TP
67\fBmode\fP \fItransfer-mode\fP
68Set the mode for transfers;
69.I transfer-mode
70may be one of
71.IR ascii
72or
73.IR binary .
74The default is
75.IR ascii .
76.TP
77\fBput\fP \fIfile\fP
8181728d 78.ns
b28a081b
JL
79.TP
80\fBput\fP \fIlocalfile remotefile\fP
8181728d 81.ns
b28a081b
JL
82.TP
83\fBput\fP \fIfile1 file2 ... fileN remote-directory\fP
84Put a file or set of files to the specified
85remote file or directory.
86The destination
87can be in one of two forms:
88a filename on the remote host, if the host has already been specified,
89or a string of the form
90.I host:filename
91to specify both a host and filename at the same time.
92If the latter form is used,
93the hostname specified becomes the default for future transfers.
94If the remote-directory form is used, the remote host is
95assumed to be a
96.I UNIX
97machine.
98.TP
99\fBget\fP \fIfilename\fP
8181728d 100.ns
b28a081b
JL
101.TP
102\fBget\fP \fIremotename\fP \fIlocalname\fP
8181728d 103.ns
b28a081b
JL
104.TP
105\fBget\fP \fIfile1\fP \fIfile2\fP ... \fIfileN\fP
106Get a file or set of files from the specified
107.IR sources .
108.I Source
109can be in one of two forms:
110a filename on the remote host, if the host has already been specified,
111or a string of the form
112.I host:filename
113to specify both a host and filename at the same time.
114If the latter form is used,
115the last hostname specified becomes the default for future transfers.
116.TP
117.B quit
118Exit
119.IR tftp .
8181728d 120An end of file also exits.
b28a081b
JL
121.TP
122.B verbose
123Toggle verbose mode.
124.TP
125.B trace
126Toggle packet tracing.
127.TP
128.B status
129Show current status.
130.TP
131\fBrexmt\fP \fIretransmission-timeout\fP
132Set the per-packet retransmission timeout, in seconds.
133.TP
134\fBtimeout\fP \fItotal-transmission-timeout\fP
135Set the total transmission timeout, in seconds.
136.TP
137.B ascii
138Shorthand for "mode ascii"
139.TP
140.B binary
141Shorthand for "mode binary"
142.TP
143\fB?\fP \ [ \fIcommand-name\fP ... ]
144Print help information.
145.SH BUGS
146.PP
147Because there is no user-login or validation within
148the
149.I TFTP
150protocol, the remote site will probably have some
151sort of file-access restrictions in place. The
152exact methods are specific to each site and therefore
153difficult to document here.