freebsd-dev/usr.bin/tftp/tftp.1

195 lines
5.3 KiB
Groff
Raw Normal View History

.\" Copyright (c) 1990, 1993, 1994
1994-05-27 12:33:43 +00:00
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)tftp.1 8.2 (Berkeley) 4/18/94
1999-08-28 01:08:13 +00:00
.\" $FreeBSD$
1994-05-27 12:33:43 +00:00
.\"
2004-05-19 09:54:14 +00:00
.Dd October 1, 2003
1994-05-27 12:33:43 +00:00
.Dt TFTP 1
.Os
1994-05-27 12:33:43 +00:00
.Sh NAME
.Nm tftp
2007-11-07 07:56:57 +00:00
.Nd "trivial file transfer program"
1994-05-27 12:33:43 +00:00
.Sh SYNOPSIS
.Nm
.Op Ar host Op Ar port
1994-05-27 12:33:43 +00:00
.Sh DESCRIPTION
2002-04-20 12:18:28 +00:00
The
.Nm
utility is the user interface to the Internet
1994-05-27 12:33:43 +00:00
.Tn TFTP
(Trivial File Transfer Protocol),
which allows users to transfer files to and from a remote machine.
The remote
.Ar host
may be specified on the command line, in which case
.Nm
1994-05-27 12:33:43 +00:00
uses
.Ar host
as the default host for future transfers (see the
2007-11-07 07:56:57 +00:00
.Ic connect
1994-05-27 12:33:43 +00:00
command below).
.Sh COMMANDS
Once
.Nm
1994-05-27 12:33:43 +00:00
is running, it issues the prompt
2007-11-07 07:56:57 +00:00
.Dq Li "tftp> "
1994-05-27 12:33:43 +00:00
and recognizes the following commands:
.Pp
2007-11-07 07:56:57 +00:00
.Bl -tag -width ".Ic verbose" -compact
.It Ic \&? Ar command-name ...
1994-05-27 12:33:43 +00:00
Print help information.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic ascii
Shorthand for
.Ic mode Cm ascii .
1994-05-27 12:33:43 +00:00
.Pp
2007-11-07 07:56:57 +00:00
.It Ic binary
Shorthand for
.Ic mode Cm binary .
1994-05-27 12:33:43 +00:00
.Pp
2007-11-07 07:56:57 +00:00
.It Ic connect Ar host Op Ar port
1994-05-27 12:33:43 +00:00
Set the
.Ar host
(and optionally
.Ar port )
for transfers.
Note that the
.Tn TFTP
protocol, unlike the
.Tn FTP
protocol,
does not maintain connections between transfers; thus, the
2007-11-07 07:56:57 +00:00
.Ic connect
1994-05-27 12:33:43 +00:00
command does not actually create a connection,
but merely remembers what host is to be used for transfers.
2001-07-15 08:06:20 +00:00
You do not have to use the
2007-11-07 07:56:57 +00:00
.Ic connect
1994-05-27 12:33:43 +00:00
command; the remote host can be specified as part of the
2007-11-07 07:56:57 +00:00
.Ic get
1994-05-27 12:33:43 +00:00
or
2007-11-07 07:56:57 +00:00
.Ic put
1994-05-27 12:33:43 +00:00
commands.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic get Oo Ar host : Oc Ns Ar file Op Ar localname
.It Ic get Xo
.Oo Ar host1 : Oc Ns Ar file1
.Oo Ar host2 : Oc Ns Ar file2 ...
.Oo Ar hostN : Oc Ns Ar fileN
.Xc
Get one or more files from the remote host.
When using the
.Ar host
argument, the
.Ar host
will be used as default host for future transfers.
If
.Ar localname
is specified, the file is stored locally as
.Ar localname ,
otherwise the original filename is used.
Note that it is not possible to download two files at a time, only
one, three, or more than three files, at a time.
.Pp
To specify an IPv6 numeric address for a host, wrap it using square
brackets like
.Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file
to disambiguate the
colons used in the IPv6 address from the colon separating the host and
the filename.
1994-05-27 12:33:43 +00:00
.Pp
2007-11-07 07:56:57 +00:00
.It Ic mode Ar transfer-mode
2001-07-15 08:06:20 +00:00
Set the mode for transfers;
1994-05-27 12:33:43 +00:00
.Ar transfer-mode
may be one of
2007-11-07 07:56:57 +00:00
.Cm ascii
1994-05-27 12:33:43 +00:00
or
2007-11-07 07:56:57 +00:00
.Cm binary .
1994-05-27 12:33:43 +00:00
The default is
2007-11-07 07:56:57 +00:00
.Cm ascii .
1994-05-27 12:33:43 +00:00
.Pp
2007-11-07 07:56:57 +00:00
.It Ic put Ar file Op Oo Ar host : Oc Ns Ar remotename
.It Ic put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory
Put a file or set of files to the remote host.
When
.Ar remotename
is specified, the file is stored remotely as
.Ar remotename ,
otherwise the original filename is used.
If the
.Ar remote-directory
argument is used, the remote host is assumed to be a
.Ux
1994-05-27 12:33:43 +00:00
machine.
To specify an IPv6 numeric address for a
.Ar host ,
see the example under the
2007-11-07 07:56:57 +00:00
.Ic get
command.
1994-05-27 12:33:43 +00:00
.Pp
2007-11-07 07:56:57 +00:00
.It Ic quit
1994-05-27 12:33:43 +00:00
Exit
.Nm .
1994-05-27 12:33:43 +00:00
An end of file also exits.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic rexmt Ar retransmission-timeout
1994-05-27 12:33:43 +00:00
Set the per-packet retransmission timeout, in seconds.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic status
1994-05-27 12:33:43 +00:00
Show current status.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic timeout Ar total-transmission-timeout
1994-05-27 12:33:43 +00:00
Set the total transmission timeout, in seconds.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic trace
1994-05-27 12:33:43 +00:00
Toggle packet tracing.
.Pp
2007-11-07 07:56:57 +00:00
.It Ic verbose
1994-05-27 12:33:43 +00:00
Toggle verbose mode.
.El
2005-01-18 13:43:56 +00:00
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.3 .
1994-05-27 12:33:43 +00:00
.Sh BUGS
Because there is no user-login or validation within
the
.Tn TFTP
protocol, the remote site will probably have some
sort of file-access restrictions in place.
The
1994-05-27 12:33:43 +00:00
exact methods are specific to each site and therefore
difficult to document here.
.Pp
Files larger than 33488896 octets (65535 blocks) cannot be transferred
without client and server supporting blocksize negotiation (RFC1783).