'\" te .\" Copyright 1989 AT&T .\" Copyright (C) 2007, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH TFTP 1 "May 7, 2007" .SH NAME tftp \- trivial file transfer program .SH SYNOPSIS .LP .nf \fBtftp\fR [\fIhost\fR [\fIport\fR]] .fi .SH DESCRIPTION .sp .LP \fBtftp\fR is the user interface to the Internet \fBTFTP\fR (Trivial File Transfer Protocol), which allows users to transfer files to and from a remote machine. The remote \fIhost\fR and optional \fIport\fR may be specified on the command line, in which case \fBtftp\fR uses \fIhost\fR as the default host, and if specified, \fIport\fR as the default port, for future transfers. See the \fBconnect\fR command below. .SH USAGE .sp .LP Once \fBtftp\fR is running, it issues the prompt \fBtftp>\fR and recognizes the following commands: .SS "Commands" .sp .ne 2 .na \fB\fBconnect\fR \fIhost-name\fR [ \fIport\fR ]\fR .ad .sp .6 .RS 4n Set the \fIhost\fR, and optionally \fIport\fR, for transfers. The \fBTFTP\fR protocol, unlike the \fBFTP\fR protocol, does not maintain connections between transfers; thus, the \fBconnect\fR command does not actually create a connection, but merely remembers what host is to be used for transfers. You do not have to use the \fBconnect\fR command; the remote host can be specified as part of the \fBget\fR or \fBput\fR commands. .RE .sp .ne 2 .na \fB\fBmode\fR \fItransfer-mode\fR\fR .ad .sp .6 .RS 4n Set the mode for transfers; \fItransfer-mode\fR may be one of \fBascii\fR or \fBbinary\fR. The default is \fBascii\fR. .RE .sp .ne 2 .na \fB\fBput\fR \fIfilename\fR\fR .ad .br .na \fB\fBput\fR \fIlocalfile remotefile\fR\fR .ad .br .na \fB\fBput\fR \fIfilename1 filename2 .\|.\|. filenameN remote-directory\fR\fR .ad .sp .6 .RS 4n Transfer a file, or a set of files, to the specified remote file or directory. The destination can be in one of two forms: a filename on the remote host if the host has already been specified, or a string of the form: .sp .in +2 .nf \fIhost\fR\fB:\fR\fIfilename\fR .fi .in -2 to specify both a \fIhost\fR and \fIfilename\fR at the same time. If the latter form is used, the specified host becomes the default for future transfers. If the remote-directory form is used, the remote host is assumed to be running the UNIX system. .sp The \fIhost\fR can be a host name (see \fBhosts\fR(5)) or an IPv4 or IPv6 address string (see \fBinet\fR(4P) or \fBinet6\fR(4P)). Since IPv6 addresses already contain \fB":"s\fR, the \fIhost\fR should be enclosed in square brackets when an IPv6 address is used. Otherwise, the first occurrence of a colon will be interpreted as the separator between the \fIhost\fR and the \fIfilename\fR. For example, .sp .in +2 .nf [1080::8:800:200c:417A]:myfile .fi .in -2 Files may be written only if they already exist and are publicly writable. See \fBin.tftpd\fR(8). .RE .sp .ne 2 .na \fB\fBget\fR \fIfilename\fR\fR .ad .br .na \fB\fBget\fR \fIremotename localname\fR\fR .ad .br .na \fB\fBget\fR \fIfilename1 filename2 filename3\fR .\|.\|. \fIfilenameN\fR\fR .ad .sp .6 .RS 4n Get a file or set of files (three or more) from the specified remote \fIsources\fR. \fBsource\fR can be in one of two forms: a filename on the remote host if the host has already been specified, or a string of the form: .sp .in +2 .nf \fIhost\fR\fB:\fR\fIfilename\fR .fi .in -2 to specify both a host and filename at the same time. If the latter form is used, the last host specified becomes the default for future transfers. See the \fBput\fR command regarding specifying a \fIhost\fR. .RE .sp .ne 2 .na \fB\fBquit\fR\fR .ad .sp .6 .RS 4n Exit \fBtftp\fR. An \fBEOF\fR also exits. .RE .sp .ne 2 .na \fB\fBverbose\fR\fR .ad .sp .6 .RS 4n Toggle verbose mode. .RE .sp .ne 2 .na \fB\fBtrace\fR\fR .ad .sp .6 .RS 4n Toggle packet tracing. .RE .sp .ne 2 .na \fB\fBstatus\fR\fR .ad .sp .6 .RS 4n Show current status. .RE .sp .ne 2 .na \fB\fBrexmt\fR\fIretransmission-timeout\fR\fR .ad .sp .6 .RS 4n Set the per-packet retransmission timeout, in seconds. .RE .sp .ne 2 .na \fB\fBtimeout\fR\fItotal-transmission-timeout\fR\fR .ad .sp .6 .RS 4n Set the total transmission timeout, in seconds. .RE .sp .ne 2 .na \fB\fBascii\fR\fR .ad .sp .6 .RS 4n Shorthand for \fBmode ascii\fR. .RE .sp .ne 2 .na \fB\fBbinary\fR\fR .ad .sp .6 .RS 4n Shorthand for \fBmode binary\fR. .RE .sp .ne 2 .na \fB\fBblksize\fR \fItransfer-blocksize\fR\fR .ad .sp .6 .RS 4n The value of the transfer blocksize option to negotiate with the server. A value of \fB0\fR disables the negotiation of this option. .RE .sp .ne 2 .na \fB\fBsrexmt\fR \fIserver-retransmission-timeout\fR\fR .ad .sp .6 .RS 4n The value of the retransmission timeout option to request that the server uses. A value of 0 disables the negotiation of this option. .RE .sp .ne 2 .na \fB\fBtsize\fR\fR .ad .sp .6 .RS 4n A toggle that sends the transfer size option to the server. By default, the option is not sent. The transfer size option is not sent with a \fBwrite\fR request when the \fItransfer-mode\fR is \fBascii\fR. .RE .sp .ne 2 .na \fB\fB? [\fR \fIcommand-name\fR .\|.\|. ]\fR .ad .sp .6 .RS 4n Print help information. .RE .SH SEE ALSO .sp .LP .BR inet (4P), .BR inet6 (4P), .BR hosts (5), .BR attributes (7), .BR in.tftpd (8) .sp .LP Malkin, G. and Harkin, A. \fIRFC 2347, TFTP Option Extension\fR. The Internet Society. May 1998 .sp .LP Malkin, G. and Harkin, A. \fIRFC 2348, TFTP Blocksize Option\fR. The Internet Society. May 1998 .sp .LP Malkin, G. and Harkin, A. \fIRFC 2349, TFTP Timeout Interval and Transfer Size Options\fR. The Internet Society. May 1998 .sp .LP Sollins, K.R. \fIRFC 1350, The TFTP Protocol (Revision 2)\fR. Network Working Group. July 1992. .SH NOTES .sp .LP The default \fItransfer-mode\fR is \fBascii\fR. This differs from pre-SunOS 4.0 and pre-4.3BSD systems, so explicit action must be taken when transferring non-ASCII binary files such as executable commands. .sp .LP Because there is no user-login or validation within the \fBTFTP\fR protocol, many remote sites restrict file access in various ways. Approved methods for file access are specific to each site, and therefore cannot be documented here. .sp .LP When using the \fBget\fR command to transfer multiple files from a remote host, three or more files must be specified. If two files are specified, the second file is used as a local file. .sp .LP With the default block size of \fB512\fR octets and a \fB16-\fRbit block counter, some \fBTFTP\fR implementations might have problems with files over \fB33,553,919\fR octets (\fB513\fR octets short of \fB32MB\fR) in size. The Solaris implementation can transfer files up to \fB4GB\fR in size. .sp .LP By default, the Solaris \fBTFTP\fR client does not enable the \fBblocksize\fR or transfer size options. Setting the \fBblocksize\fR option to a higher value is sometimes useful as a workaround when dealing with peers that have a \fB32MB\fR limit.