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