xref: /original-bsd/usr.bin/tftp/tftp.1 (revision 64cd2caf)
1.\" Copyright (c) 1990, 1993, 1994
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)tftp.1	8.2 (Berkeley) 04/18/94
7.\"
8.Dd
9.Dt TFTP 1
10.Os BSD 4.3
11.Sh NAME
12.Nm tftp
13.Nd trivial file transfer program
14.Sh SYNOPSIS
15.Nm tftp
16.Op Ar host
17.Sh DESCRIPTION
18.Nm Tftp
19is the user interface to the Internet
20.Tn TFTP
21(Trivial File Transfer Protocol),
22which allows users to transfer files to and from a remote machine.
23The remote
24.Ar host
25may be specified on the command line, in which case
26.Nm tftp
27uses
28.Ar host
29as the default host for future transfers (see the
30.Cm connect
31command below).
32.Sh COMMANDS
33Once
34.Nm tftp
35is running, it issues the prompt
36.LI tftp>
37and recognizes the following commands:
38.Pp
39.Bl -tag -width verbose -compact
40.It Cm \&? Ar command-name ...
41Print help information.
42.Pp
43.It Cm ascii
44Shorthand for "mode ascii"
45.Pp
46.It Cm binary
47Shorthand for "mode binary"
48.Pp
49.It Cm connect Ar host-name Op Ar port
50Set the
51.Ar host
52(and optionally
53.Ar port )
54for transfers.
55Note that the
56.Tn TFTP
57protocol, unlike the
58.Tn FTP
59protocol,
60does not maintain connections between transfers; thus, the
61.Cm connect
62command does not actually create a connection,
63but merely remembers what host is to be used for transfers.
64You do not have to use the
65.Cm connect
66command; the remote host can be specified as part of the
67.Cm get
68or
69.Cm put
70commands.
71.Pp
72.It Cm get Ar filename
73.It Cm get Ar remotename localname
74.It Cm get Ar file1 file2 ...  fileN
75Get a file or set of files from the specified
76.Ar sources .
77.Ar Source
78can be in one of two forms:
79a filename on the remote host, if the host has already been specified,
80or a string of the form
81.Ar hosts:filename
82to specify both a host and filename at the same time.
83If the latter form is used,
84the last hostname specified becomes the default for future transfers.
85.Pp
86.It Cm mode Ar transfer-mode
87Set the mode for transfers;
88.Ar transfer-mode
89may be one of
90.Em ascii
91or
92.Em binary .
93The default is
94.Em ascii .
95.Pp
96.It Cm put Ar file
97.It Cm put Ar localfile remotefile
98.It Cm put Ar file1 file2 ... fileN remote-directory
99Put a file or set of files to the specified
100remote file or directory.
101The destination
102can be in one of two forms:
103a filename on the remote host, if the host has already been specified,
104or a string of the form
105.Ar hosts:filename
106to specify both a host and filename at the same time.
107If the latter form is used,
108the hostname specified becomes the default for future transfers.
109If the remote-directory form is used, the remote host is
110assumed to be a
111.Tn UNIX
112machine.
113.Pp
114.It Cm quit
115Exit
116.Nm tftp .
117An end of file also exits.
118.Pp
119.It Cm rexmt Ar retransmission-timeout
120Set the per-packet retransmission timeout, in seconds.
121.Pp
122.It Cm status
123Show current status.
124.Pp
125.It Cm timeout Ar total-transmission-timeout
126Set the total transmission timeout, in seconds.
127.Pp
128.It Cm trace
129Toggle packet tracing.
130.Pp
131.It Cm verbose
132Toggle verbose mode.
133.El
134.Sh BUGS
135.Pp
136Because there is no user-login or validation within
137the
138.Tn 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.
143.Sh HISTORY
144The
145.Nm
146command appeared in
147.Bx 4.3 .
148