1*0a6a1f1dSLionel Sambuc.\" $NetBSD: ftp.1,v 1.135 2015/04/23 23:31:23 lukem Exp $ 204203a83SThomas Cort.\" 3*0a6a1f1dSLionel Sambuc.\" Copyright (c) 1996-2015 The NetBSD Foundation, Inc. 404203a83SThomas Cort.\" All rights reserved. 504203a83SThomas Cort.\" 604203a83SThomas Cort.\" This code is derived from software contributed to The NetBSD Foundation 704203a83SThomas Cort.\" by Luke Mewburn. 804203a83SThomas Cort.\" 904203a83SThomas Cort.\" Redistribution and use in source and binary forms, with or without 1004203a83SThomas Cort.\" modification, are permitted provided that the following conditions 1104203a83SThomas Cort.\" are met: 1204203a83SThomas Cort.\" 1. Redistributions of source code must retain the above copyright 1304203a83SThomas Cort.\" notice, this list of conditions and the following disclaimer. 1404203a83SThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright 1504203a83SThomas Cort.\" notice, this list of conditions and the following disclaimer in the 1604203a83SThomas Cort.\" documentation and/or other materials provided with the distribution. 1704203a83SThomas Cort.\" 1804203a83SThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1904203a83SThomas Cort.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2004203a83SThomas Cort.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2104203a83SThomas Cort.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2204203a83SThomas Cort.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2304203a83SThomas Cort.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2404203a83SThomas Cort.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2504203a83SThomas Cort.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2604203a83SThomas Cort.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2704203a83SThomas Cort.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2804203a83SThomas Cort.\" POSSIBILITY OF SUCH DAMAGE. 2904203a83SThomas Cort.\" 3004203a83SThomas Cort.\" 3104203a83SThomas Cort.\" Copyright (c) 1985, 1989, 1990, 1993 3204203a83SThomas Cort.\" The Regents of the University of California. All rights reserved. 3304203a83SThomas Cort.\" 3404203a83SThomas Cort.\" Redistribution and use in source and binary forms, with or without 3504203a83SThomas Cort.\" modification, are permitted provided that the following conditions 3604203a83SThomas Cort.\" are met: 3704203a83SThomas Cort.\" 1. Redistributions of source code must retain the above copyright 3804203a83SThomas Cort.\" notice, this list of conditions and the following disclaimer. 3904203a83SThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright 4004203a83SThomas Cort.\" notice, this list of conditions and the following disclaimer in the 4104203a83SThomas Cort.\" documentation and/or other materials provided with the distribution. 4204203a83SThomas Cort.\" 3. Neither the name of the University nor the names of its contributors 4304203a83SThomas Cort.\" may be used to endorse or promote products derived from this software 4404203a83SThomas Cort.\" without specific prior written permission. 4504203a83SThomas Cort.\" 4604203a83SThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 4704203a83SThomas Cort.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4804203a83SThomas Cort.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 4904203a83SThomas Cort.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 5004203a83SThomas Cort.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 5104203a83SThomas Cort.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 5204203a83SThomas Cort.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 5304203a83SThomas Cort.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 5404203a83SThomas Cort.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 5504203a83SThomas Cort.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5604203a83SThomas Cort.\" SUCH DAMAGE. 5704203a83SThomas Cort.\" 5804203a83SThomas Cort.\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 5904203a83SThomas Cort.\" 60*0a6a1f1dSLionel Sambuc.Dd April 24, 2015 6104203a83SThomas Cort.Dt FTP 1 6204203a83SThomas Cort.Os 6304203a83SThomas Cort.Sh NAME 6404203a83SThomas Cort.Nm ftp 6504203a83SThomas Cort.Nd Internet file transfer program 6604203a83SThomas Cort.Sh SYNOPSIS 6704203a83SThomas Cort.Nm 6804203a83SThomas Cort.Op Fl 46AadefginpRtVv 6904203a83SThomas Cort.Op Fl N Ar netrc 7004203a83SThomas Cort.Op Fl o Ar output 7104203a83SThomas Cort.Op Fl P Ar port 7204203a83SThomas Cort.Op Fl q Ar quittime 7304203a83SThomas Cort.Op Fl r Ar retry 7404203a83SThomas Cort.Op Fl s Ar srcaddr 7504203a83SThomas Cort.Bk -words 7604203a83SThomas Cort.\" [-T dir,max[,inc]] 7704203a83SThomas Cort.Oo 7804203a83SThomas Cort.Fl T Xo 7904203a83SThomas Cort.Sm off 8004203a83SThomas Cort.Ar dir , 8104203a83SThomas Cort.Ar max 8204203a83SThomas Cort.Op , Ar inc 8304203a83SThomas Cort.Sm on 8404203a83SThomas Cort.Xc 8504203a83SThomas Cort.Oc 8604203a83SThomas Cort.Ek 87*0a6a1f1dSLionel Sambuc.Op Fl x Ar xferbufsize 8804203a83SThomas Cort.Bk -words 8904203a83SThomas Cort.\" [[user@]host [port]] 9004203a83SThomas Cort.Oo 9104203a83SThomas Cort.Oo Ar user Ns Li \&@ Oc Ns Ar host 9204203a83SThomas Cort.Op Ar port 9304203a83SThomas Cort.Oc 9404203a83SThomas Cort.Ek 9504203a83SThomas Cort.Bk -words 9604203a83SThomas Cort.\" [[user@]host:[path][/]] 9704203a83SThomas Cort.Sm off 9804203a83SThomas Cort.Oo 9904203a83SThomas Cort.Op Ar user Li \&@ 10004203a83SThomas Cort.Ar host Li \&: 10104203a83SThomas Cort.Op Ar path 10204203a83SThomas Cort.Op Li / 10304203a83SThomas Cort.Oc 10404203a83SThomas Cort.Sm on 10504203a83SThomas Cort.Ek 10604203a83SThomas Cort.Bk -words 10704203a83SThomas Cort.\" [file:///path] 10804203a83SThomas Cort.Sm off 10904203a83SThomas Cort.Oo 11004203a83SThomas Cort.Li file:/// Ar path 11104203a83SThomas Cort.Oc 11204203a83SThomas Cort.Sm on 11304203a83SThomas Cort.Ek 11404203a83SThomas Cort.Bk -words 11504203a83SThomas Cort.\" [ftp://[user[:password]@]host[:port]/path[/]] 11604203a83SThomas Cort.Sm off 11704203a83SThomas Cort.Oo 11804203a83SThomas Cort.Li ftp:// 11904203a83SThomas Cort.Oo Ar user 12004203a83SThomas Cort.Op Li \&: Ar password 12104203a83SThomas Cort.Li \&@ Oc 12204203a83SThomas Cort.Ar host Oo Li \&: Ar port Oc 12304203a83SThomas Cort.Li / Ar path 12404203a83SThomas Cort.Op Li / 12504203a83SThomas Cort.Op Li ;type= Ar X 12604203a83SThomas Cort.Oc 12704203a83SThomas Cort.Sm on 12804203a83SThomas Cort.Ek 12904203a83SThomas Cort.Bk -words 13004203a83SThomas Cort.\" [http://[user[:password]@]host[:port]/path] 13104203a83SThomas Cort.Sm off 13204203a83SThomas Cort.Oo 13304203a83SThomas Cort.Li http:// 13404203a83SThomas Cort.Oo Ar user 13504203a83SThomas Cort.Op Li \&: Ar password 13604203a83SThomas Cort.Li \&@ Oc 13704203a83SThomas Cort.Ar host Oo Li \&: Ar port Oc 13804203a83SThomas Cort.Li / Ar path 13904203a83SThomas Cort.Oc 14004203a83SThomas Cort.Sm on 14104203a83SThomas Cort.Ek 14204203a83SThomas Cort.Op Ar \&.\&.\&. 14304203a83SThomas Cort.Nm 14404203a83SThomas Cort.Bk -words 14504203a83SThomas Cort.Fl u Ar URL Ar file 14604203a83SThomas Cort.Ek 14704203a83SThomas Cort.Op Ar \&.\&.\&. 14804203a83SThomas Cort.Sh DESCRIPTION 14904203a83SThomas Cort.Nm 15004203a83SThomas Cortis the user interface to the Internet standard File Transfer Protocol. 15104203a83SThomas CortThe program allows a user to transfer files to and from a 15204203a83SThomas Cortremote network site. 15304203a83SThomas Cort.Pp 15404203a83SThomas CortThe last five arguments will fetch a file using the 15504203a83SThomas Cort.Tn FTP 15604203a83SThomas Cortor 15704203a83SThomas Cort.Tn HTTP 15804203a83SThomas Cortprotocols, or by direct copying, into the current directory. 15904203a83SThomas CortThis is ideal for scripts. 16004203a83SThomas CortRefer to 16104203a83SThomas Cort.Sx AUTO-FETCHING FILES 16204203a83SThomas Cortbelow for more information. 16304203a83SThomas Cort.Pp 16404203a83SThomas CortOptions may be specified at the command line, or to the 16504203a83SThomas Cortcommand interpreter. 16604203a83SThomas Cort.Bl -tag -width Fl 16704203a83SThomas Cort.It Fl 4 16804203a83SThomas CortForces 16904203a83SThomas Cort.Nm 17004203a83SThomas Cortto only use IPv4 addresses. 17104203a83SThomas Cort.It Fl 6 17204203a83SThomas CortForces 17304203a83SThomas Cort.Nm 17404203a83SThomas Cortto only use IPv6 addresses. 17504203a83SThomas Cort.It Fl A 17604203a83SThomas CortForce active mode ftp. 17704203a83SThomas CortBy default, 17804203a83SThomas Cort.Nm 17904203a83SThomas Cortwill try to use passive mode ftp and fall back to active mode 18004203a83SThomas Cortif passive is not supported by the server. 18104203a83SThomas CortThis option causes 18204203a83SThomas Cort.Nm 18304203a83SThomas Cortto always use an active connection. 18404203a83SThomas CortIt is only useful for connecting to very old servers that do not 18504203a83SThomas Cortimplement passive mode properly. 18604203a83SThomas Cort.It Fl a 18704203a83SThomas CortCauses 18804203a83SThomas Cort.Nm 18904203a83SThomas Cortto bypass normal login procedure, and use an anonymous login instead. 19004203a83SThomas Cort.It Fl d 19104203a83SThomas CortEnables debugging. 19204203a83SThomas Cort.It Fl e 19304203a83SThomas CortDisables command line editing. 19404203a83SThomas CortThis is useful for Emacs ange-ftp mode. 19504203a83SThomas Cort.It Fl f 19604203a83SThomas CortForces a cache reload for transfers that go through the 19704203a83SThomas Cort.Tn FTP 19804203a83SThomas Cortor 19904203a83SThomas Cort.Tn HTTP 20004203a83SThomas Cortproxies. 20104203a83SThomas Cort.It Fl g 20204203a83SThomas CortDisables file name globbing. 20304203a83SThomas Cort.It Fl i 20404203a83SThomas CortTurns off interactive prompting during 20504203a83SThomas Cortmultiple file transfers. 20604203a83SThomas Cort.It Fl N Ar netrc 20704203a83SThomas CortUse 20804203a83SThomas Cort.Ar netrc 20904203a83SThomas Cortinstead of 21004203a83SThomas Cort.Pa ~/.netrc . 21104203a83SThomas CortRefer to 21204203a83SThomas Cort.Sx THE .netrc FILE 21304203a83SThomas Cortfor more information. 21404203a83SThomas Cort.It Fl n 21504203a83SThomas CortRestrains 21604203a83SThomas Cort.Nm 21704203a83SThomas Cortfrom attempting 21804203a83SThomas Cort.Dq auto-login 21904203a83SThomas Cortupon initial connection for non auto-fetch transfers. 22004203a83SThomas CortIf auto-login is enabled, 22104203a83SThomas Cort.Nm 22204203a83SThomas Cortwill check the 22304203a83SThomas Cort.Pa .netrc 22404203a83SThomas Cort(see below) file in the user's home directory for an entry describing 22504203a83SThomas Cortan account on the remote machine. 22604203a83SThomas CortIf no entry exists, 22704203a83SThomas Cort.Nm 22804203a83SThomas Cortwill prompt for the remote machine login name (default is the user 22904203a83SThomas Cortidentity on the local machine), and, if necessary, prompt for a password 23004203a83SThomas Cortand an account with which to login. 23104203a83SThomas CortTo override the auto-login for auto-fetch transfers, specify the 23204203a83SThomas Cortusername (and optionally, password) as appropriate. 23304203a83SThomas Cort.It Fl o Ar output 23404203a83SThomas CortWhen auto-fetching files, save the contents in 23504203a83SThomas Cort.Ar output . 23604203a83SThomas Cort.Ar output 23704203a83SThomas Cortis parsed according to the 23804203a83SThomas Cort.Sx FILE NAMING CONVENTIONS 23904203a83SThomas Cortbelow. 24004203a83SThomas CortIf 24104203a83SThomas Cort.Ar output 24204203a83SThomas Cortis not 24304203a83SThomas Cort.Sq - 24404203a83SThomas Cortor doesn't start with 24504203a83SThomas Cort.Sq \&| , 24604203a83SThomas Cortthen only the first file specified will be retrieved into 24704203a83SThomas Cort.Ar output ; 24804203a83SThomas Cortall other files will be retrieved into the basename of their 24904203a83SThomas Cortremote name. 25004203a83SThomas Cort.It Fl P Ar port 25104203a83SThomas CortSets the port number to 25204203a83SThomas Cort.Ar port . 25304203a83SThomas Cort.It Fl p 25404203a83SThomas CortEnable passive mode operation for use behind connection filtering firewalls. 25504203a83SThomas CortThis option has been deprecated as 25604203a83SThomas Cort.Nm 25704203a83SThomas Cortnow tries to use passive mode by default, falling back to active mode 25804203a83SThomas Cortif the server does not support passive connections. 25904203a83SThomas Cort.It Fl q Ar quittime 26004203a83SThomas CortQuit if the connection has stalled for 26104203a83SThomas Cort.Ar quittime 26204203a83SThomas Cortseconds. 26304203a83SThomas Cort.It Fl R 26404203a83SThomas CortRestart all non-proxied auto-fetches. 26504203a83SThomas Cort.It Fl r Ar wait 26604203a83SThomas CortRetry the connection attempt if it failed, pausing for 26704203a83SThomas Cort.Ar wait 26804203a83SThomas Cortseconds. 26904203a83SThomas Cort.It Fl s Ar srcaddr 27004203a83SThomas CortUses 27104203a83SThomas Cort.Ar srcaddr 27204203a83SThomas Cortas the local IP address for all connections. 27304203a83SThomas Cort.It Fl t 27404203a83SThomas CortEnables packet tracing. 27504203a83SThomas Cort.It Fl T Ar direction Ns , Ns Ar maximum Ns Oo , Ns Ar increment Oc 27604203a83SThomas CortSet the maximum transfer rate for 27704203a83SThomas Cort.Ar direction 27804203a83SThomas Cortto 27904203a83SThomas Cort.Ar maximum 28004203a83SThomas Cortbytes/second, 28104203a83SThomas Cortand if specified, the increment to 28204203a83SThomas Cort.Ar increment 28304203a83SThomas Cortbytes/second. 28404203a83SThomas CortRefer to 28504203a83SThomas Cort.Ic rate 28604203a83SThomas Cortfor more information. 28704203a83SThomas Cort.It Fl u Ar URL file Op \&.\&.\&. 28804203a83SThomas CortUpload files on the command line to 28904203a83SThomas Cort.Ar URL 29004203a83SThomas Cortwhere 29104203a83SThomas Cort.Ar URL 29204203a83SThomas Cortis one of the ftp URL types as supported by auto-fetch 29304203a83SThomas Cort(with an optional target filename for single file uploads), and 29404203a83SThomas Cort.Ar file 29504203a83SThomas Cortis one or more local files to be uploaded. 29604203a83SThomas Cort.It Fl V 29704203a83SThomas CortDisable 29804203a83SThomas Cort.Ic verbose 29904203a83SThomas Cortand 30004203a83SThomas Cort.Ic progress , 30104203a83SThomas Cortoverriding the default of enabled when output is to a terminal. 30204203a83SThomas Cort.It Fl v 30304203a83SThomas CortEnable 30404203a83SThomas Cort.Ic verbose 30504203a83SThomas Cortand 30604203a83SThomas Cort.Ic progress . 30704203a83SThomas CortThis is the default if output is to a terminal (and in the case of 30804203a83SThomas Cort.Ic progress , 30904203a83SThomas Cort.Nm 31004203a83SThomas Cortis the foreground process). 31104203a83SThomas CortForces 31204203a83SThomas Cort.Nm 31304203a83SThomas Cortto show all responses from the remote server, as well 31404203a83SThomas Cortas report on data transfer statistics. 315*0a6a1f1dSLionel Sambuc.It Fl x Ar xferbufsize 316*0a6a1f1dSLionel SambucSet the size of the socket send and receive buffers to 317*0a6a1f1dSLionel Sambuc.Ar xferbufsize . 318*0a6a1f1dSLionel SambucRefer to 319*0a6a1f1dSLionel Sambuc.Ic xferbuf 320*0a6a1f1dSLionel Sambucfor more information. 32104203a83SThomas Cort.El 32204203a83SThomas Cort.Pp 32304203a83SThomas CortThe client host with which 32404203a83SThomas Cort.Nm 32504203a83SThomas Cortis to communicate may be specified on the command line. 32604203a83SThomas CortIf this is done, 32704203a83SThomas Cort.Nm 32804203a83SThomas Cortwill immediately attempt to establish a connection to an 32904203a83SThomas Cort.Tn FTP 33004203a83SThomas Cortserver on that host; otherwise, 33104203a83SThomas Cort.Nm 33204203a83SThomas Cortwill enter its command interpreter and await instructions 33304203a83SThomas Cortfrom the user. 33404203a83SThomas CortWhen 33504203a83SThomas Cort.Nm 33604203a83SThomas Cortis awaiting commands from the user the prompt 33704203a83SThomas Cort.Ql ftp\*[Gt] 33804203a83SThomas Cortis provided to the user. 33904203a83SThomas CortThe following commands are recognized 34004203a83SThomas Cortby 34104203a83SThomas Cort.Nm ftp : 34204203a83SThomas Cort.Bl -tag -width Ic 34304203a83SThomas Cort.It Ic \&! Op Ar command Op Ar args 34404203a83SThomas CortInvoke an interactive shell on the local machine. 34504203a83SThomas CortIf there are arguments, the first is taken to be a command to execute 34604203a83SThomas Cortdirectly, with the rest of the arguments as its arguments. 34704203a83SThomas Cort.It Ic \&$ Ar macro-name Op Ar args 34804203a83SThomas CortExecute the macro 34904203a83SThomas Cort.Ar macro-name 35004203a83SThomas Cortthat was defined with the 35104203a83SThomas Cort.Ic macdef 35204203a83SThomas Cortcommand. 35304203a83SThomas CortArguments are passed to the macro unglobbed. 35404203a83SThomas Cort.It Ic account Op Ar passwd 35504203a83SThomas CortSupply a supplemental password required by a remote system for access 35604203a83SThomas Cortto resources once a login has been successfully completed. 35704203a83SThomas CortIf no argument is included, the user will be prompted for an account 35804203a83SThomas Cortpassword in a non-echoing input mode. 35904203a83SThomas Cort.It Ic append Ar local-file Op Ar remote-file 36004203a83SThomas CortAppend a local file to a file on the remote machine. 36104203a83SThomas CortIf 36204203a83SThomas Cort.Ar remote-file 36304203a83SThomas Cortis left unspecified, the local file name is used in naming the 36404203a83SThomas Cortremote file after being altered by any 36504203a83SThomas Cort.Ic ntrans 36604203a83SThomas Cortor 36704203a83SThomas Cort.Ic nmap 36804203a83SThomas Cortsetting. 36904203a83SThomas CortFile transfer uses the current settings for 37004203a83SThomas Cort.Ic type , 37104203a83SThomas Cort.Ic format , 37204203a83SThomas Cort.Ic mode , 37304203a83SThomas Cortand 37404203a83SThomas Cort.Ic structure . 37504203a83SThomas Cort.It Ic ascii 37604203a83SThomas CortSet the file transfer 37704203a83SThomas Cort.Ic type 37804203a83SThomas Cortto network 37904203a83SThomas Cort.Tn ASCII . 38004203a83SThomas CortThis is the default type. 38104203a83SThomas Cort.It Ic bell 38204203a83SThomas CortArrange that a bell be sounded after each file transfer 38304203a83SThomas Cortcommand is completed. 38404203a83SThomas Cort.It Ic binary 38504203a83SThomas CortSet the file transfer 38604203a83SThomas Cort.Ic type 38704203a83SThomas Cortto support binary image transfer. 38804203a83SThomas Cort.It Ic bye 38904203a83SThomas CortTerminate the 39004203a83SThomas Cort.Tn FTP 39104203a83SThomas Cortsession with the remote server 39204203a83SThomas Cortand exit 39304203a83SThomas Cort.Nm ftp . 39404203a83SThomas CortAn end of file will also terminate the session and exit. 39504203a83SThomas Cort.It Ic case 39604203a83SThomas CortToggle remote computer file name case mapping during 39704203a83SThomas Cort.Ic get , 39804203a83SThomas Cort.Ic mget 39904203a83SThomas Cortand 40004203a83SThomas Cort.Ic mput 40104203a83SThomas Cortcommands. 40204203a83SThomas CortWhen 40304203a83SThomas Cort.Ic case 40404203a83SThomas Cortis on (default is off), remote computer file names with all letters in 40504203a83SThomas Cortupper case are written in the local directory with the letters mapped 40604203a83SThomas Cortto lower case. 40704203a83SThomas Cort.It Ic \&cd Ar remote-directory 40804203a83SThomas CortChange the working directory on the remote machine 40904203a83SThomas Cortto 41004203a83SThomas Cort.Ar remote-directory . 41104203a83SThomas Cort.It Ic cdup 41204203a83SThomas CortChange the remote machine working directory to the parent of the 41304203a83SThomas Cortcurrent remote machine working directory. 41404203a83SThomas Cort.It Ic chmod Ar mode remote-file 41504203a83SThomas CortChange the permission modes of the file 41604203a83SThomas Cort.Ar remote-file 41704203a83SThomas Corton the remote 41804203a83SThomas Cortsystem to 41904203a83SThomas Cort.Ar mode . 42004203a83SThomas Cort.It Ic close 42104203a83SThomas CortTerminate the 42204203a83SThomas Cort.Tn FTP 42304203a83SThomas Cortsession with the remote server, and 42404203a83SThomas Cortreturn to the command interpreter. 42504203a83SThomas CortAny defined macros are erased. 42604203a83SThomas Cort.It Ic \&cr 42704203a83SThomas CortToggle carriage return stripping during 42804203a83SThomas Cortascii type file retrieval. 42904203a83SThomas CortRecords are denoted by a carriage return/linefeed sequence 43004203a83SThomas Cortduring ascii type file transfer. 43104203a83SThomas CortWhen 43204203a83SThomas Cort.Ic \&cr 43304203a83SThomas Cortis on (the default), carriage returns are stripped from this 43404203a83SThomas Cortsequence to conform with the 43504203a83SThomas Cort.Ux 43604203a83SThomas Cortsingle linefeed record 43704203a83SThomas Cortdelimiter. 43804203a83SThomas CortRecords on 43904203a83SThomas Cort.Pf non\- Ns Ux 44004203a83SThomas Cortremote systems may contain single linefeeds; 44104203a83SThomas Cortwhen an ascii type transfer is made, these linefeeds may be 44204203a83SThomas Cortdistinguished from a record delimiter only when 44304203a83SThomas Cort.Ic \&cr 44404203a83SThomas Cortis off. 44504203a83SThomas Cort.It Ic delete Ar remote-file 44604203a83SThomas CortDelete the file 44704203a83SThomas Cort.Ar remote-file 44804203a83SThomas Corton the remote machine. 44904203a83SThomas Cort.It Ic dir Op Ar remote-path Op Ar local-file 45004203a83SThomas CortPrint a listing of the contents of a 45104203a83SThomas Cortdirectory on the remote machine. 45204203a83SThomas CortThe listing includes any system-dependent information that the server 45304203a83SThomas Cortchooses to include; for example, most 45404203a83SThomas Cort.Ux 45504203a83SThomas Cortsystems will produce 45604203a83SThomas Cortoutput from the command 45704203a83SThomas Cort.Ql ls \-l . 45804203a83SThomas CortIf 45904203a83SThomas Cort.Ar remote-path 46004203a83SThomas Cortis left unspecified, the current working directory is used. 46104203a83SThomas CortIf interactive prompting is on, 46204203a83SThomas Cort.Nm 46304203a83SThomas Cortwill prompt the user to verify that the last argument is indeed the 46404203a83SThomas Corttarget local file for receiving 46504203a83SThomas Cort.Ic dir 46604203a83SThomas Cortoutput. 46704203a83SThomas CortIf no local file is specified, or if 46804203a83SThomas Cort.Ar local-file 46904203a83SThomas Cortis 47004203a83SThomas Cort.Sq Fl , 47104203a83SThomas Cortthe output is sent to the terminal. 47204203a83SThomas Cort.It Ic disconnect 47304203a83SThomas CortA synonym for 47404203a83SThomas Cort.Ic close . 47504203a83SThomas Cort.It Ic edit 47604203a83SThomas CortToggle command line editing, and context sensitive command and file 47704203a83SThomas Cortcompletion. 47804203a83SThomas CortThis is automatically enabled if input is from a terminal, and 47904203a83SThomas Cortdisabled otherwise. 48004203a83SThomas Cort.It Ic epsv epsv4 epsv6 48104203a83SThomas CortToggle the use of the extended 48204203a83SThomas Cort.Dv EPSV 48304203a83SThomas Cortand 48404203a83SThomas Cort.Dv EPRT 48504203a83SThomas Cortcommands on all IP, IPv4, and IPv6 connections respectively. 48604203a83SThomas CortFirst try 48704203a83SThomas Cort.Dv EPSV / 48804203a83SThomas Cort.Dv EPRT , 48904203a83SThomas Cortand then 49004203a83SThomas Cort.Dv PASV / 49104203a83SThomas Cort.Dv PORT . 49204203a83SThomas CortThis is enabled by default. 49304203a83SThomas CortIf an extended command fails then this option will be temporarily 49404203a83SThomas Cortdisabled for the duration of the current connection, or until 49504203a83SThomas Cort.Ic epsv , 49604203a83SThomas Cort.Ic epsv4 , 49704203a83SThomas Cortor 49804203a83SThomas Cort.Ic epsv6 49904203a83SThomas Cortis executed again. 50004203a83SThomas Cort.It Ic exit 50104203a83SThomas CortA synonym for 50204203a83SThomas Cort.Ic bye . 50304203a83SThomas Cort.It Ic features 50404203a83SThomas CortDisplay what features the remote server supports (using the 50504203a83SThomas Cort.Dv FEAT 50604203a83SThomas Cortcommand). 50704203a83SThomas Cort.It Ic fget Ar localfile 50804203a83SThomas CortRetrieve the files listed in 50904203a83SThomas Cort.Ar localfile , 51004203a83SThomas Cortwhich has one line per filename. 51104203a83SThomas Cort.It Ic form Ar format 51204203a83SThomas CortSet the file transfer 51304203a83SThomas Cort.Ic form 51404203a83SThomas Cortto 51504203a83SThomas Cort.Ar format . 51604203a83SThomas CortThe default (and only supported) 51704203a83SThomas Cortformat is 51804203a83SThomas Cort.Dq non-print . 51904203a83SThomas Cort.It Ic ftp Ar host Op Ar port 52004203a83SThomas CortA synonym for 52104203a83SThomas Cort.Ic open . 52204203a83SThomas Cort.It Ic ftp_debug Op Ar ftp_debug-value 52304203a83SThomas CortToggle debugging mode. 52404203a83SThomas CortIf an optional 52504203a83SThomas Cort.Ar ftp_debug-value 52604203a83SThomas Cortis specified it is used to set the debugging level. 52704203a83SThomas CortWhen debugging is on, 52804203a83SThomas Cort.Nm 52904203a83SThomas Cortprints each command sent to the remote machine, preceded 53004203a83SThomas Cortby the string 53104203a83SThomas Cort.Ql \-\-\*[Gt] . 53204203a83SThomas Cort.It Ic gate Op Ar host Op Ar port 53304203a83SThomas CortToggle gate-ftp mode, which used to connect through the 53404203a83SThomas CortTIS FWTK and Gauntlet ftp proxies. 53504203a83SThomas CortThis will not be permitted if the gate-ftp server hasn't been set 53604203a83SThomas Cort(either explicitly by the user, or from the 53704203a83SThomas Cort.Ev FTPSERVER 53804203a83SThomas Cortenvironment variable). 53904203a83SThomas CortIf 54004203a83SThomas Cort.Ar host 54104203a83SThomas Cortis given, 54204203a83SThomas Cortthen gate-ftp mode will be enabled, and the gate-ftp server will be set to 54304203a83SThomas Cort.Ar host . 54404203a83SThomas CortIf 54504203a83SThomas Cort.Ar port 54604203a83SThomas Cortis also given, that will be used as the port to connect to on the 54704203a83SThomas Cortgate-ftp server. 54804203a83SThomas Cort.It Ic get Ar remote-file Op Ar local-file 54904203a83SThomas CortRetrieve the 55004203a83SThomas Cort.Ar remote-file 55104203a83SThomas Cortand store it on the local machine. 55204203a83SThomas CortIf the local 55304203a83SThomas Cortfile name is not specified, it is given the same 55404203a83SThomas Cortname it has on the remote machine, subject to 55504203a83SThomas Cortalteration by the current 55604203a83SThomas Cort.Ic case , 55704203a83SThomas Cort.Ic ntrans , 55804203a83SThomas Cortand 55904203a83SThomas Cort.Ic nmap 56004203a83SThomas Cortsettings. 56104203a83SThomas CortThe current settings for 56204203a83SThomas Cort.Ic type , 56304203a83SThomas Cort.Ic form , 56404203a83SThomas Cort.Ic mode , 56504203a83SThomas Cortand 56604203a83SThomas Cort.Ic structure 56704203a83SThomas Cortare used while transferring the file. 56804203a83SThomas Cort.It Ic glob 56904203a83SThomas CortToggle filename expansion for 57004203a83SThomas Cort.Ic mdelete , 57104203a83SThomas Cort.Ic mget , 57204203a83SThomas Cort.Ic mput , 57304203a83SThomas Cortand 57404203a83SThomas Cort.Ic mreget . 57504203a83SThomas CortIf globbing is turned off with 57604203a83SThomas Cort.Ic glob , 57704203a83SThomas Cortthe file name arguments 57804203a83SThomas Cortare taken literally and not expanded. 57904203a83SThomas CortGlobbing for 58004203a83SThomas Cort.Ic mput 58104203a83SThomas Cortis done as in 58204203a83SThomas Cort.Xr csh 1 . 58304203a83SThomas CortFor 58404203a83SThomas Cort.Ic mdelete , 58504203a83SThomas Cort.Ic mget , 58604203a83SThomas Cortand 58704203a83SThomas Cort.Ic mreget , 58804203a83SThomas Corteach remote file name is expanded 58904203a83SThomas Cortseparately on the remote machine and the lists are not merged. 59004203a83SThomas CortExpansion of a directory name is likely to be 59104203a83SThomas Cortdifferent from expansion of the name of an ordinary file: 59204203a83SThomas Cortthe exact result depends on the foreign operating system and ftp server, 59304203a83SThomas Cortand can be previewed by doing 59404203a83SThomas Cort.Ql mls remote-files \- 59504203a83SThomas CortNote: 59604203a83SThomas Cort.Ic mget , 59704203a83SThomas Cort.Ic mput 59804203a83SThomas Cortand 59904203a83SThomas Cort.Ic mreget 60004203a83SThomas Cortare not meant to transfer 60104203a83SThomas Cortentire directory subtrees of files. 60204203a83SThomas CortThat can be done by 60304203a83SThomas Corttransferring a 60404203a83SThomas Cort.Xr tar 1 60504203a83SThomas Cortarchive of the subtree (in binary mode). 60604203a83SThomas Cort.It Ic hash Op Ar size 60704203a83SThomas CortToggle hash-sign 60804203a83SThomas Cort.Pq Sq # 60904203a83SThomas Cortprinting for each data block transferred. 61004203a83SThomas CortThe size of a data block defaults to 1024 bytes. 61104203a83SThomas CortThis can be changed by specifying 61204203a83SThomas Cort.Ar size 61304203a83SThomas Cortin bytes. 61404203a83SThomas CortEnabling 61504203a83SThomas Cort.Ic hash 61604203a83SThomas Cortdisables 61704203a83SThomas Cort.Ic progress . 61804203a83SThomas Cort.It Ic help Op Ar command 61904203a83SThomas CortPrint an informative message about the meaning of 62004203a83SThomas Cort.Ar command . 62104203a83SThomas CortIf no argument is given, 62204203a83SThomas Cort.Nm 62304203a83SThomas Cortprints a list of the known commands. 62404203a83SThomas Cort.It Ic idle Op Ar seconds 62504203a83SThomas CortSet the inactivity timer on the remote server to 62604203a83SThomas Cort.Ar seconds 62704203a83SThomas Cortseconds. 62804203a83SThomas CortIf 62904203a83SThomas Cort.Ar seconds 63004203a83SThomas Cortis omitted, the current inactivity timer is printed. 63104203a83SThomas Cort.It Ic image 63204203a83SThomas CortA synonym for 63304203a83SThomas Cort.Ic binary . 63404203a83SThomas Cort.It Ic lcd Op Ar directory 63504203a83SThomas CortChange the working directory on the local machine. 63604203a83SThomas CortIf 63704203a83SThomas Cortno 63804203a83SThomas Cort.Ar directory 63904203a83SThomas Cortis specified, the user's home directory is used. 64004203a83SThomas Cort.It Ic less Ar file 64104203a83SThomas CortA synonym for 64204203a83SThomas Cort.Ic page . 64304203a83SThomas Cort.It Ic lpage Ar local-file 64404203a83SThomas CortDisplay 64504203a83SThomas Cort.Ar local-file 64604203a83SThomas Cortwith the program specified by the 64704203a83SThomas Cort.Ic "set pager" 64804203a83SThomas Cortoption. 64904203a83SThomas Cort.It Ic lpwd 65004203a83SThomas CortPrint the working directory on the local machine. 65104203a83SThomas Cort.It Ic \&ls Op Ar remote-path Op Ar local-file 65204203a83SThomas CortA synonym for 65304203a83SThomas Cort.Ic dir . 65404203a83SThomas Cort.It Ic macdef Ar macro-name 65504203a83SThomas CortDefine a macro. 65604203a83SThomas CortSubsequent lines are stored as the macro 65704203a83SThomas Cort.Ar macro-name ; 65804203a83SThomas Corta null line (consecutive newline characters in a file or carriage 65904203a83SThomas Cortreturns from the terminal) terminates macro input mode. 66004203a83SThomas CortThere is a limit of 16 macros and 4096 total characters in all 66104203a83SThomas Cortdefined macros. 66204203a83SThomas CortMacro names can be a maximum of 8 characters. 66304203a83SThomas CortMacros are only applicable to the current session they are 66404203a83SThomas Cortdefined within (or if defined outside a session, to the session 66504203a83SThomas Cortinvoked with the next 66604203a83SThomas Cort.Ic open 66704203a83SThomas Cortcommand), and remain defined until a 66804203a83SThomas Cort.Ic close 66904203a83SThomas Cortcommand is executed. 67004203a83SThomas CortTo invoke a macro, use the 67104203a83SThomas Cort.Ic $ 67204203a83SThomas Cortcommand (see above). 67304203a83SThomas Cort.Pp 67404203a83SThomas CortThe macro processor interprets 67504203a83SThomas Cort.Sq $ 67604203a83SThomas Cortand 67704203a83SThomas Cort.Sq \e 67804203a83SThomas Cortas special characters. 67904203a83SThomas CortA 68004203a83SThomas Cort.Sq $ 68104203a83SThomas Cortfollowed by a number (or numbers) is replaced by the 68204203a83SThomas Cortcorresponding argument on the macro invocation command line. 68304203a83SThomas CortA 68404203a83SThomas Cort.Sq $ 68504203a83SThomas Cortfollowed by an 68604203a83SThomas Cort.Sq i 68704203a83SThomas Cortsignals the macro processor that the executing macro is to be 68804203a83SThomas Cortlooped. 68904203a83SThomas CortOn the first pass 69004203a83SThomas Cort.Dq $i 69104203a83SThomas Cortis replaced by the first argument on the macro invocation command 69204203a83SThomas Cortline, on the second pass it is replaced by the second argument, 69304203a83SThomas Cortand so on. 69404203a83SThomas CortA 69504203a83SThomas Cort.Sq \e 69604203a83SThomas Cortfollowed by any character is replaced by that character. 69704203a83SThomas CortUse the 69804203a83SThomas Cort.Sq \e 69904203a83SThomas Cortto prevent special treatment of the 70004203a83SThomas Cort.Sq $ . 70104203a83SThomas Cort.It Ic mdelete Op Ar remote-files 70204203a83SThomas CortDelete the 70304203a83SThomas Cort.Ar remote-files 70404203a83SThomas Corton the remote machine. 70504203a83SThomas Cort.It Ic mdir Ar remote-files local-file 70604203a83SThomas CortLike 70704203a83SThomas Cort.Ic dir , 70804203a83SThomas Cortexcept multiple remote files may be specified. 70904203a83SThomas CortIf interactive prompting is on, 71004203a83SThomas Cort.Nm 71104203a83SThomas Cortwill prompt the user to verify that the last argument is indeed the 71204203a83SThomas Corttarget local file for receiving 71304203a83SThomas Cort.Ic mdir 71404203a83SThomas Cortoutput. 71504203a83SThomas Cort.It Ic mget Ar remote-files 71604203a83SThomas CortExpand the 71704203a83SThomas Cort.Ar remote-files 71804203a83SThomas Corton the remote machine 71904203a83SThomas Cortand do a 72004203a83SThomas Cort.Ic get 72104203a83SThomas Cortfor each file name thus produced. 72204203a83SThomas CortSee 72304203a83SThomas Cort.Ic glob 72404203a83SThomas Cortfor details on the filename expansion. 72504203a83SThomas CortResulting file names will then be processed according to 72604203a83SThomas Cort.Ic case , 72704203a83SThomas Cort.Ic ntrans , 72804203a83SThomas Cortand 72904203a83SThomas Cort.Ic nmap 73004203a83SThomas Cortsettings. 73104203a83SThomas CortFiles are transferred into the local working directory, 73204203a83SThomas Cortwhich can be changed with 73304203a83SThomas Cort.Ql lcd directory ; 73404203a83SThomas Cortnew local directories can be created with 73504203a83SThomas Cort.Ql "\&! mkdir directory" . 73604203a83SThomas Cort.It Ic mkdir Ar directory-name 73704203a83SThomas CortMake a directory on the remote machine. 73804203a83SThomas Cort.It Ic mls Ar remote-files local-file 73904203a83SThomas CortLike 74004203a83SThomas Cort.Ic ls , 74104203a83SThomas Cortexcept multiple remote files may be specified, 74204203a83SThomas Cortand the 74304203a83SThomas Cort.Ar local-file 74404203a83SThomas Cortmust be specified. 74504203a83SThomas CortIf interactive prompting is on, 74604203a83SThomas Cort.Nm 74704203a83SThomas Cortwill prompt the user to verify that the last argument is indeed the 74804203a83SThomas Corttarget local file for receiving 74904203a83SThomas Cort.Ic mls 75004203a83SThomas Cortoutput. 75104203a83SThomas Cort.It Ic mlsd Op Ar remote-path 75204203a83SThomas CortDisplay the contents of 75304203a83SThomas Cort.Ar remote-path 75404203a83SThomas Cort(which should default to the current directory if not given) 75504203a83SThomas Cortin a machine-parsable form, using 75604203a83SThomas Cort.Dv MLSD . 75704203a83SThomas CortThe format of display can be changed with 75804203a83SThomas Cort.Sq "remopts mlst ..." . 75904203a83SThomas Cort.It Ic mlst Op Ar remote-path 76004203a83SThomas CortDisplay the details about 76104203a83SThomas Cort.Ar remote-path 76204203a83SThomas Cort(which should default to the current directory if not given) 76304203a83SThomas Cortin a machine-parsable form, using 76404203a83SThomas Cort.Dv MLST . 76504203a83SThomas CortThe format of display can be changed with 76604203a83SThomas Cort.Sq "remopts mlst ..." . 76704203a83SThomas Cort.It Ic mode Ar mode-name 76804203a83SThomas CortSet the file transfer 76904203a83SThomas Cort.Ic mode 77004203a83SThomas Cortto 77104203a83SThomas Cort.Ar mode-name . 77204203a83SThomas CortThe default (and only supported) 77304203a83SThomas Cortmode is 77404203a83SThomas Cort.Dq stream . 77504203a83SThomas Cort.It Ic modtime Ar remote-file 77604203a83SThomas CortShow the last modification time of the file on the remote machine, in 77704203a83SThomas Cort.Li RFC 2822 77804203a83SThomas Cortformat. 77904203a83SThomas Cort.It Ic more Ar file 78004203a83SThomas CortA synonym for 78104203a83SThomas Cort.Ic page . 78204203a83SThomas Cort.It Ic mput Ar local-files 78304203a83SThomas CortExpand wild cards in the list of local files given as arguments 78404203a83SThomas Cortand do a 78504203a83SThomas Cort.Ic put 78604203a83SThomas Cortfor each file in the resulting list. 78704203a83SThomas CortSee 78804203a83SThomas Cort.Ic glob 78904203a83SThomas Cortfor details of filename expansion. 79004203a83SThomas CortResulting file names will then be processed according to 79104203a83SThomas Cort.Ic ntrans 79204203a83SThomas Cortand 79304203a83SThomas Cort.Ic nmap 79404203a83SThomas Cortsettings. 79504203a83SThomas Cort.It Ic mreget Ar remote-files 79604203a83SThomas CortAs per 79704203a83SThomas Cort.Ic mget , 79804203a83SThomas Cortbut performs a 79904203a83SThomas Cort.Ic reget 80004203a83SThomas Cortinstead of 80104203a83SThomas Cort.Ic get . 80204203a83SThomas Cort.It Ic msend Ar local-files 80304203a83SThomas CortA synonym for 80404203a83SThomas Cort.Ic mput . 80504203a83SThomas Cort.It Ic newer Ar remote-file Op Ar local-file 80604203a83SThomas CortGet the file only if the modification time of the remote file is more 80704203a83SThomas Cortrecent that the file on the current system. 80804203a83SThomas CortIf the file does not 80904203a83SThomas Cortexist on the current system, the remote file is considered 81004203a83SThomas Cort.Ic newer . 81104203a83SThomas CortOtherwise, this command is identical to 81204203a83SThomas Cort.Ar get . 81304203a83SThomas Cort.It Ic nlist Op Ar remote-path Op Ar local-file 81404203a83SThomas CortA synonym for 81504203a83SThomas Cort.Ic ls . 81604203a83SThomas Cort.It Ic nmap Op Ar inpattern outpattern 81704203a83SThomas CortSet or unset the filename mapping mechanism. 81804203a83SThomas CortIf no arguments are specified, the filename mapping mechanism is unset. 81904203a83SThomas CortIf arguments are specified, remote filenames are mapped during 82004203a83SThomas Cort.Ic mput 82104203a83SThomas Cortcommands and 82204203a83SThomas Cort.Ic put 82304203a83SThomas Cortcommands issued without a specified remote target filename. 82404203a83SThomas CortIf arguments are specified, local filenames are mapped during 82504203a83SThomas Cort.Ic mget 82604203a83SThomas Cortcommands and 82704203a83SThomas Cort.Ic get 82804203a83SThomas Cortcommands issued without a specified local target filename. 82904203a83SThomas CortThis command is useful when connecting to a 83004203a83SThomas Cort.No non\- Ns Ux 83104203a83SThomas Cortremote computer 83204203a83SThomas Cortwith different file naming conventions or practices. 83304203a83SThomas CortThe mapping follows the pattern set by 83404203a83SThomas Cort.Ar inpattern 83504203a83SThomas Cortand 83604203a83SThomas Cort.Ar outpattern . 83704203a83SThomas Cort.Op Ar Inpattern 83804203a83SThomas Cortis a template for incoming filenames (which may have already been 83904203a83SThomas Cortprocessed according to the 84004203a83SThomas Cort.Ic ntrans 84104203a83SThomas Cortand 84204203a83SThomas Cort.Ic case 84304203a83SThomas Cortsettings). 84404203a83SThomas CortVariable templating is accomplished by including the 84504203a83SThomas Cortsequences 84604203a83SThomas Cort.Dq $1 , 84704203a83SThomas Cort.Dq $2 , 84804203a83SThomas Cort\&... 84904203a83SThomas Cort.Dq $9 85004203a83SThomas Cortin 85104203a83SThomas Cort.Ar inpattern . 85204203a83SThomas CortUse 85304203a83SThomas Cort.Sq \e 85404203a83SThomas Cortto prevent this special treatment of the 85504203a83SThomas Cort.Sq $ 85604203a83SThomas Cortcharacter. 85704203a83SThomas CortAll other characters are treated literally, and are used to determine the 85804203a83SThomas Cort.Ic nmap 85904203a83SThomas Cort.Op Ar inpattern 86004203a83SThomas Cortvariable values. 86104203a83SThomas CortFor example, given 86204203a83SThomas Cort.Ar inpattern 86304203a83SThomas Cort$1.$2 and the remote file name "mydata.data", $1 would have the value 86404203a83SThomas Cort"mydata", and $2 would have the value "data". 86504203a83SThomas CortThe 86604203a83SThomas Cort.Ar outpattern 86704203a83SThomas Cortdetermines the resulting mapped filename. 86804203a83SThomas CortThe sequences 86904203a83SThomas Cort.Dq $1 , 87004203a83SThomas Cort.Dq $2 , 87104203a83SThomas Cort\&... 87204203a83SThomas Cort.Dq $9 87304203a83SThomas Cortare replaced by any value resulting from the 87404203a83SThomas Cort.Ar inpattern 87504203a83SThomas Corttemplate. 87604203a83SThomas CortThe sequence 87704203a83SThomas Cort.Dq $0 87804203a83SThomas Cortis replaced by the original filename. 87904203a83SThomas CortAdditionally, the sequence 88004203a83SThomas Cort.Dq Op Ar seq1 , Ar seq2 88104203a83SThomas Cortis replaced by 88204203a83SThomas Cort.Op Ar seq1 88304203a83SThomas Cortif 88404203a83SThomas Cort.Ar seq1 88504203a83SThomas Cortis not a null string; otherwise it is replaced by 88604203a83SThomas Cort.Ar seq2 . 88704203a83SThomas CortFor example, the command 88804203a83SThomas Cort.Pp 88904203a83SThomas Cort.Bd -literal -offset indent -compact 89004203a83SThomas Cortnmap $1.$2.$3 [$1,$2].[$2,file] 89104203a83SThomas Cort.Ed 89204203a83SThomas Cort.Pp 89304203a83SThomas Cortwould yield 89404203a83SThomas Cortthe output filename "myfile.data" for input filenames "myfile.data" and 89504203a83SThomas Cort"myfile.data.old", "myfile.file" for the input filename "myfile", and 89604203a83SThomas Cort"myfile.myfile" for the input filename ".myfile". 89704203a83SThomas CortSpaces may be included in 89804203a83SThomas Cort.Ar outpattern , 89904203a83SThomas Cortas in the example: 90004203a83SThomas Cort.Dl nmap $1 sed "s/ *$//" \*[Gt] $1 90104203a83SThomas CortUse the 90204203a83SThomas Cort.Sq \e 90304203a83SThomas Cortcharacter to prevent special treatment 90404203a83SThomas Cortof the 90504203a83SThomas Cort.Sq $ , 90604203a83SThomas Cort.Sq \&[ , 90704203a83SThomas Cort.Sq \&] , 90804203a83SThomas Cortand 90904203a83SThomas Cort.Sq \&, 91004203a83SThomas Cortcharacters. 91104203a83SThomas Cort.It Ic ntrans Op Ar inchars Op Ar outchars 91204203a83SThomas CortSet or unset the filename character translation mechanism. 91304203a83SThomas CortIf no arguments are specified, the filename character 91404203a83SThomas Corttranslation mechanism is unset. 91504203a83SThomas CortIf arguments are specified, characters in 91604203a83SThomas Cortremote filenames are translated during 91704203a83SThomas Cort.Ic mput 91804203a83SThomas Cortcommands and 91904203a83SThomas Cort.Ic put 92004203a83SThomas Cortcommands issued without a specified remote target filename. 92104203a83SThomas CortIf arguments are specified, characters in 92204203a83SThomas Cortlocal filenames are translated during 92304203a83SThomas Cort.Ic mget 92404203a83SThomas Cortcommands and 92504203a83SThomas Cort.Ic get 92604203a83SThomas Cortcommands issued without a specified local target filename. 92704203a83SThomas CortThis command is useful when connecting to a 92804203a83SThomas Cort.No non\- Ns Ux 92904203a83SThomas Cortremote computer 93004203a83SThomas Cortwith different file naming conventions or practices. 93104203a83SThomas CortCharacters in a filename matching a character in 93204203a83SThomas Cort.Ar inchars 93304203a83SThomas Cortare replaced with the corresponding character in 93404203a83SThomas Cort.Ar outchars . 93504203a83SThomas CortIf the character's position in 93604203a83SThomas Cort.Ar inchars 93704203a83SThomas Cortis longer than the length of 93804203a83SThomas Cort.Ar outchars , 93904203a83SThomas Cortthe character is deleted from the file name. 94004203a83SThomas Cort.It Ic open Ar host Op Ar port 94104203a83SThomas CortEstablish a connection to the specified 94204203a83SThomas Cort.Ar host 94304203a83SThomas Cort.Tn FTP 94404203a83SThomas Cortserver. 94504203a83SThomas CortAn optional port number may be supplied, 94604203a83SThomas Cortin which case, 94704203a83SThomas Cort.Nm 94804203a83SThomas Cortwill attempt to contact an 94904203a83SThomas Cort.Tn FTP 95004203a83SThomas Cortserver at that port. 95104203a83SThomas CortIf the 95204203a83SThomas Cort.Ic "set auto-login" 95304203a83SThomas Cortoption is on (default), 95404203a83SThomas Cort.Nm 95504203a83SThomas Cortwill also attempt to automatically log the user in to 95604203a83SThomas Cortthe 95704203a83SThomas Cort.Tn FTP 95804203a83SThomas Cortserver (see below). 95904203a83SThomas Cort.It Ic page Ar file 96004203a83SThomas CortRetrieve 96104203a83SThomas Cort.Ic file 96204203a83SThomas Cortand display with the program specified by the 96304203a83SThomas Cort.Ic "set pager" 96404203a83SThomas Cortoption. 96504203a83SThomas Cort.It Ic passive Op Cm auto 96604203a83SThomas CortToggle passive mode (if no arguments are given). 96704203a83SThomas CortIf 96804203a83SThomas Cort.Cm auto 96904203a83SThomas Cortis given, act as if 97004203a83SThomas Cort.Ev FTPMODE 97104203a83SThomas Cortis set to 97204203a83SThomas Cort.Sq auto . 97304203a83SThomas CortIf passive mode is turned on (default), 97404203a83SThomas Cort.Nm 97504203a83SThomas Cortwill send a 97604203a83SThomas Cort.Dv PASV 97704203a83SThomas Cortcommand for all data connections instead of a 97804203a83SThomas Cort.Dv PORT 97904203a83SThomas Cortcommand. 98004203a83SThomas CortThe 98104203a83SThomas Cort.Dv PASV 98204203a83SThomas Cortcommand requests that the remote server open a port for the data connection 98304203a83SThomas Cortand return the address of that port. 98404203a83SThomas CortThe remote server listens on that port and the client connects to it. 98504203a83SThomas CortWhen using the more traditional 98604203a83SThomas Cort.Dv PORT 98704203a83SThomas Cortcommand, the client listens on a port and sends that address to the remote 98804203a83SThomas Cortserver, who connects back to it. 98904203a83SThomas CortPassive mode is useful when using 99004203a83SThomas Cort.Nm 99104203a83SThomas Cortthrough a gateway router or host that controls the directionality of 99204203a83SThomas Corttraffic. 99304203a83SThomas Cort(Note that though 99404203a83SThomas Cort.Tn FTP 99504203a83SThomas Cortservers are required to support the 99604203a83SThomas Cort.Dv PASV 99704203a83SThomas Cortcommand by 99804203a83SThomas Cort.Li RFC 1123 , 99904203a83SThomas Cortsome do not.) 100004203a83SThomas Cort.It Ic pdir Op Ar remote-path 100104203a83SThomas CortPerform 100204203a83SThomas Cort.Ic dir 100304203a83SThomas Cort.Op Ar remote-path , 100404203a83SThomas Cortand display the result with the program specified by the 100504203a83SThomas Cort.Ic "set pager" 100604203a83SThomas Cortoption. 100704203a83SThomas Cort.It Ic pls Op Ar remote-path 100804203a83SThomas CortPerform 100904203a83SThomas Cort.Ic ls 101004203a83SThomas Cort.Op Ar remote-path , 101104203a83SThomas Cortand display the result with the program specified by the 101204203a83SThomas Cort.Ic "set pager" 101304203a83SThomas Cortoption. 101404203a83SThomas Cort.It Ic pmlsd Op Ar remote-path 101504203a83SThomas CortPerform 101604203a83SThomas Cort.Ic mlsd 101704203a83SThomas Cort.Op Ar remote-path , 101804203a83SThomas Cortand display the result with the program specified by the 101904203a83SThomas Cort.Ic "set pager" 102004203a83SThomas Cortoption. 102104203a83SThomas Cort.It Ic preserve 102204203a83SThomas CortToggle preservation of modification times on retrieved files. 102304203a83SThomas Cort.It Ic progress 102404203a83SThomas CortToggle display of transfer progress bar. 102504203a83SThomas CortThe progress bar will be disabled for a transfer that has 102604203a83SThomas Cort.Ar local-file 102704203a83SThomas Cortas 102804203a83SThomas Cort.Sq Fl 102904203a83SThomas Cortor a command that starts with 103004203a83SThomas Cort.Sq \&| . 103104203a83SThomas CortRefer to 103204203a83SThomas Cort.Sx FILE NAMING CONVENTIONS 103304203a83SThomas Cortfor more information. 103404203a83SThomas CortEnabling 103504203a83SThomas Cort.Ic progress 103604203a83SThomas Cortdisables 103704203a83SThomas Cort.Ic hash . 103804203a83SThomas Cort.It Ic prompt 103904203a83SThomas CortToggle interactive prompting. 104004203a83SThomas CortInteractive prompting 104104203a83SThomas Cortoccurs during multiple file transfers to allow the 104204203a83SThomas Cortuser to selectively retrieve or store files. 104304203a83SThomas CortIf prompting is turned off (default is on), any 104404203a83SThomas Cort.Ic mget 104504203a83SThomas Cortor 104604203a83SThomas Cort.Ic mput 104704203a83SThomas Cortwill transfer all files, and any 104804203a83SThomas Cort.Ic mdelete 104904203a83SThomas Cortwill delete all files. 105004203a83SThomas Cort.Pp 105104203a83SThomas CortWhen prompting is on, the following commands are available at a prompt: 105204203a83SThomas Cort.Bl -tag -width 2n -offset indent 105304203a83SThomas Cort.It Cm a 105404203a83SThomas CortAnswer 105504203a83SThomas Cort.Sq yes 105604203a83SThomas Cortto the current file, and automatically answer 105704203a83SThomas Cort.Sq yes 105804203a83SThomas Cortto any remaining files for the current command. 105904203a83SThomas Cort.It Cm n 106004203a83SThomas CortAnswer 106104203a83SThomas Cort.Sq no , 106204203a83SThomas Cortand do not transfer the file. 106304203a83SThomas Cort.It Cm p 106404203a83SThomas CortAnswer 106504203a83SThomas Cort.Sq yes 106604203a83SThomas Cortto the current file, and turn off prompt mode 106704203a83SThomas Cort(as is 106804203a83SThomas Cort.Dq prompt off 106904203a83SThomas Corthad been given). 107004203a83SThomas Cort.It Cm q 107104203a83SThomas CortTerminate the current operation. 107204203a83SThomas Cort.It Cm y 107304203a83SThomas CortAnswer 107404203a83SThomas Cort.Sq yes , 107504203a83SThomas Cortand transfer the file. 107604203a83SThomas Cort.It Cm \&? 107704203a83SThomas CortDisplay a help message. 107804203a83SThomas Cort.El 107904203a83SThomas Cort.Pp 108004203a83SThomas CortAny other response will answer 108104203a83SThomas Cort.Sq yes 108204203a83SThomas Cortto the current file. 108304203a83SThomas Cort.It Ic proxy Ar ftp-command 108404203a83SThomas CortExecute an ftp command on a secondary control connection. 108504203a83SThomas CortThis command allows simultaneous connection to two remote 108604203a83SThomas Cort.Tn FTP 108704203a83SThomas Cortservers for transferring files between the two servers. 108804203a83SThomas CortThe first 108904203a83SThomas Cort.Ic proxy 109004203a83SThomas Cortcommand should be an 109104203a83SThomas Cort.Ic open , 109204203a83SThomas Cortto establish the secondary control connection. 109304203a83SThomas CortEnter the command "proxy ?" to see other 109404203a83SThomas Cort.Tn FTP 109504203a83SThomas Cortcommands executable on the secondary connection. 109604203a83SThomas CortThe following commands behave differently when prefaced by 109704203a83SThomas Cort.Ic proxy : 109804203a83SThomas Cort.Ic open 109904203a83SThomas Cortwill not define new macros during the auto-login process, 110004203a83SThomas Cort.Ic close 110104203a83SThomas Cortwill not erase existing macro definitions, 110204203a83SThomas Cort.Ic get 110304203a83SThomas Cortand 110404203a83SThomas Cort.Ic mget 110504203a83SThomas Corttransfer files from the host on the primary control connection 110604203a83SThomas Cortto the host on the secondary control connection, and 110704203a83SThomas Cort.Ic put , 110804203a83SThomas Cort.Ic mput , 110904203a83SThomas Cortand 111004203a83SThomas Cort.Ic append 111104203a83SThomas Corttransfer files from the host on the secondary control connection 111204203a83SThomas Cortto the host on the primary control connection. 111304203a83SThomas CortThird party file transfers depend upon support of the 111404203a83SThomas Cort.Tn FTP 111504203a83SThomas Cortprotocol 111604203a83SThomas Cort.Dv PASV 111704203a83SThomas Cortcommand by the server on the secondary control connection. 111804203a83SThomas Cort.It Ic put Ar local-file Op Ar remote-file 111904203a83SThomas CortStore a local file on the remote machine. 112004203a83SThomas CortIf 112104203a83SThomas Cort.Ar remote-file 112204203a83SThomas Cortis left unspecified, the local file name is used 112304203a83SThomas Cortafter processing according to any 112404203a83SThomas Cort.Ic ntrans 112504203a83SThomas Cortor 112604203a83SThomas Cort.Ic nmap 112704203a83SThomas Cortsettings 112804203a83SThomas Cortin naming the remote file. 112904203a83SThomas CortFile transfer uses the 113004203a83SThomas Cortcurrent settings for 113104203a83SThomas Cort.Ic type , 113204203a83SThomas Cort.Ic format , 113304203a83SThomas Cort.Ic mode , 113404203a83SThomas Cortand 113504203a83SThomas Cort.Ic structure . 113604203a83SThomas Cort.It Ic pwd 113704203a83SThomas CortPrint the name of the current working directory on the remote 113804203a83SThomas Cortmachine. 113904203a83SThomas Cort.It Ic quit 114004203a83SThomas CortA synonym for 114104203a83SThomas Cort.Ic bye . 114204203a83SThomas Cort.It Ic quote Ar arg1 arg2 ... 114304203a83SThomas CortThe arguments specified are sent, verbatim, to the remote 114404203a83SThomas Cort.Tn FTP 114504203a83SThomas Cortserver. 114604203a83SThomas Cort.It Ic rate Ar direction Oo Ar maximum Oo Ar increment Oc Oc 114704203a83SThomas CortThrottle the maximum transfer rate to 114804203a83SThomas Cort.Ar maximum 114904203a83SThomas Cortbytes/second. 115004203a83SThomas CortIf 115104203a83SThomas Cort.Ar maximum 115204203a83SThomas Cortis 0, disable the throttle. 115304203a83SThomas Cort.Pp 115404203a83SThomas Cort.Ar direction 115504203a83SThomas Cortmay be one of: 115604203a83SThomas Cort.Bl -tag -width "all" -offset indent -compact 115704203a83SThomas Cort.It Cm all 115804203a83SThomas CortBoth directions. 115904203a83SThomas Cort.It Cm get 116004203a83SThomas CortIncoming transfers. 116104203a83SThomas Cort.It Cm put 116204203a83SThomas CortOutgoing transfers. 116304203a83SThomas Cort.El 116404203a83SThomas Cort.Pp 116504203a83SThomas Cort.Ar maximum 116604203a83SThomas Cortcan be modified on the fly by 116704203a83SThomas Cort.Ar increment 116804203a83SThomas Cortbytes (default: 1024) each time a given signal is received: 116904203a83SThomas Cort.Bl -tag -width "SIGUSR1" -offset indent 117004203a83SThomas Cort.It Dv SIGUSR1 117104203a83SThomas CortIncrement 117204203a83SThomas Cort.Ar maximum 117304203a83SThomas Cortby 117404203a83SThomas Cort.Ar increment 117504203a83SThomas Cortbytes. 117604203a83SThomas Cort.It Dv SIGUSR2 117704203a83SThomas CortDecrement 117804203a83SThomas Cort.Ar maximum 117904203a83SThomas Cortby 118004203a83SThomas Cort.Ar increment 118104203a83SThomas Cortbytes. 118204203a83SThomas CortThe result must be a positive number. 118304203a83SThomas Cort.El 118404203a83SThomas Cort.Pp 118504203a83SThomas CortIf 118604203a83SThomas Cort.Ar maximum 118704203a83SThomas Cortis not supplied, the current throttle rates are displayed. 118804203a83SThomas Cort.Pp 118904203a83SThomas CortNote: 119004203a83SThomas Cort.Ic rate 119104203a83SThomas Cortis not yet implemented for ascii mode transfers. 119204203a83SThomas Cort.It Ic rcvbuf Ar size 119304203a83SThomas CortSet the size of the socket receive buffer to 119404203a83SThomas Cort.Ar size . 119504203a83SThomas Cort.It Ic recv Ar remote-file Op Ar local-file 119604203a83SThomas CortA synonym for 119704203a83SThomas Cort.Ic get . 119804203a83SThomas Cort.It Ic reget Ar remote-file Op Ar local-file 119904203a83SThomas Cort.Ic reget 120004203a83SThomas Cortacts like 120104203a83SThomas Cort.Ic get , 120204203a83SThomas Cortexcept that if 120304203a83SThomas Cort.Ar local-file 120404203a83SThomas Cortexists and is 120504203a83SThomas Cortsmaller than 120604203a83SThomas Cort.Ar remote-file , 120704203a83SThomas Cort.Ar local-file 120804203a83SThomas Cortis presumed to be 120904203a83SThomas Corta partially transferred copy of 121004203a83SThomas Cort.Ar remote-file 121104203a83SThomas Cortand the transfer 121204203a83SThomas Cortis continued from the apparent point of failure. 121304203a83SThomas CortThis command 121404203a83SThomas Cortis useful when transferring very large files over networks that 121504203a83SThomas Cortare prone to dropping connections. 121604203a83SThomas Cort.It Ic remopts Ar command Op Ar command-options 121704203a83SThomas CortSet options on the remote 121804203a83SThomas Cort.Tn FTP 121904203a83SThomas Cortserver for 122004203a83SThomas Cort.Ar command 122104203a83SThomas Cortto 122204203a83SThomas Cort.Ar command-options 122304203a83SThomas Cort(whose absence is handled on a command-specific basis). 122404203a83SThomas CortRemote 122504203a83SThomas Cort.Tn FTP 122604203a83SThomas Cortcommands known to support options include: 122704203a83SThomas Cort.Sq MLST 122804203a83SThomas Cort(used for 122904203a83SThomas Cort.Dv MLSD 123004203a83SThomas Cortand 123104203a83SThomas Cort.Dv MLST ) . 123204203a83SThomas Cort.It Ic rename Op Ar from Op Ar to 123304203a83SThomas CortRename the file 123404203a83SThomas Cort.Ar from 123504203a83SThomas Corton the remote machine, to the file 123604203a83SThomas Cort.Ar to . 123704203a83SThomas Cort.It Ic reset 123804203a83SThomas CortClear reply queue. 123904203a83SThomas CortThis command re-synchronizes command/reply sequencing with the remote 124004203a83SThomas Cort.Tn FTP 124104203a83SThomas Cortserver. 124204203a83SThomas CortResynchronization may be necessary following a violation of the 124304203a83SThomas Cort.Tn FTP 124404203a83SThomas Cortprotocol by the remote server. 124504203a83SThomas Cort.It Ic restart Ar marker 124604203a83SThomas CortRestart the immediately following 124704203a83SThomas Cort.Ic get 124804203a83SThomas Cortor 124904203a83SThomas Cort.Ic put 125004203a83SThomas Cortat the 125104203a83SThomas Cortindicated 125204203a83SThomas Cort.Ar marker . 125304203a83SThomas CortOn 125404203a83SThomas Cort.Ux 125504203a83SThomas Cortsystems, marker is usually a byte 125604203a83SThomas Cortoffset into the file. 125704203a83SThomas Cort.It Ic rhelp Op Ar command-name 125804203a83SThomas CortRequest help from the remote 125904203a83SThomas Cort.Tn FTP 126004203a83SThomas Cortserver. 126104203a83SThomas CortIf a 126204203a83SThomas Cort.Ar command-name 126304203a83SThomas Cortis specified it is supplied to the server as well. 126404203a83SThomas Cort.It Ic rmdir Ar directory-name 126504203a83SThomas CortDelete a directory on the remote machine. 126604203a83SThomas Cort.It Ic rstatus Op Ar remote-file 126704203a83SThomas CortWith no arguments, show status of remote machine. 126804203a83SThomas CortIf 126904203a83SThomas Cort.Ar remote-file 127004203a83SThomas Cortis specified, show status of 127104203a83SThomas Cort.Ar remote-file 127204203a83SThomas Corton remote machine. 127304203a83SThomas Cort.It Ic runique 127404203a83SThomas CortToggle storing of files on the local system with unique filenames. 127504203a83SThomas CortIf a file already exists with a name equal to the target 127604203a83SThomas Cortlocal filename for a 127704203a83SThomas Cort.Ic get 127804203a83SThomas Cortor 127904203a83SThomas Cort.Ic mget 128004203a83SThomas Cortcommand, a ".1" is appended to the name. 128104203a83SThomas CortIf the resulting name matches another existing file, 128204203a83SThomas Corta ".2" is appended to the original name. 128304203a83SThomas CortIf this process continues up to ".99", an error 128404203a83SThomas Cortmessage is printed, and the transfer does not take place. 128504203a83SThomas CortThe generated unique filename will be reported. 128604203a83SThomas CortNote that 128704203a83SThomas Cort.Ic runique 128804203a83SThomas Cortwill not affect local files generated from a shell command 128904203a83SThomas Cort(see below). 129004203a83SThomas CortThe default value is off. 129104203a83SThomas Cort.It Ic send Ar local-file Op Ar remote-file 129204203a83SThomas CortA synonym for 129304203a83SThomas Cort.Ic put . 129404203a83SThomas Cort.It Ic sendport 129504203a83SThomas CortToggle the use of 129604203a83SThomas Cort.Dv PORT 129704203a83SThomas Cortcommands. 129804203a83SThomas CortBy default, 129904203a83SThomas Cort.Nm 130004203a83SThomas Cortwill attempt to use a 130104203a83SThomas Cort.Dv PORT 130204203a83SThomas Cortcommand when establishing 130304203a83SThomas Corta connection for each data transfer. 130404203a83SThomas CortThe use of 130504203a83SThomas Cort.Dv PORT 130604203a83SThomas Cortcommands can prevent delays 130704203a83SThomas Cortwhen performing multiple file transfers. 130804203a83SThomas CortIf the 130904203a83SThomas Cort.Dv PORT 131004203a83SThomas Cortcommand fails, 131104203a83SThomas Cort.Nm 131204203a83SThomas Cortwill use the default data port. 131304203a83SThomas CortWhen the use of 131404203a83SThomas Cort.Dv PORT 131504203a83SThomas Cortcommands is disabled, no attempt will be made to use 131604203a83SThomas Cort.Dv PORT 131704203a83SThomas Cortcommands for each data transfer. 131804203a83SThomas CortThis is useful 131904203a83SThomas Cortfor certain 132004203a83SThomas Cort.Tn FTP 132104203a83SThomas Cortimplementations which do ignore 132204203a83SThomas Cort.Dv PORT 132304203a83SThomas Cortcommands but, incorrectly, indicate they've been accepted. 132404203a83SThomas Cort.It Ic set Op Ar option Ar value 132504203a83SThomas CortSet 132604203a83SThomas Cort.Ar option 132704203a83SThomas Cortto 132804203a83SThomas Cort.Ar value . 132904203a83SThomas CortIf 133004203a83SThomas Cort.Ar option 133104203a83SThomas Cortand 133204203a83SThomas Cort.Ar value 133304203a83SThomas Cortare not given, display all of the options and their values. 133404203a83SThomas CortThe currently supported options are: 133504203a83SThomas Cort.Bl -tag -width "https_proxy" -offset indent 133604203a83SThomas Cort.It Cm anonpass 133704203a83SThomas CortDefaults to 133804203a83SThomas Cort.Ev $FTPANONPASS 133904203a83SThomas Cort.It Cm ftp_proxy 134004203a83SThomas CortDefaults to 134104203a83SThomas Cort.Ev $ftp_proxy . 134204203a83SThomas Cort.It Cm http_proxy 134304203a83SThomas CortDefaults to 134404203a83SThomas Cort.Ev $http_proxy . 134504203a83SThomas Cort.It Cm https_proxy 134604203a83SThomas CortDefaults to 134704203a83SThomas Cort.Ev $https_proxy . 134804203a83SThomas Cort.It Cm no_proxy 134904203a83SThomas CortDefaults to 135004203a83SThomas Cort.Ev $no_proxy . 135104203a83SThomas Cort.It Cm pager 135204203a83SThomas CortDefaults to 135304203a83SThomas Cort.Ev $PAGER . 135404203a83SThomas Cort.It Cm prompt 135504203a83SThomas CortDefaults to 135604203a83SThomas Cort.Ev $FTPPROMPT . 135704203a83SThomas Cort.It Cm rprompt 135804203a83SThomas CortDefaults to 135904203a83SThomas Cort.Ev $FTPRPROMPT . 136004203a83SThomas Cort.El 136104203a83SThomas Cort.It Ic site Ar arg1 arg2 ... 136204203a83SThomas CortThe arguments specified are sent, verbatim, to the remote 136304203a83SThomas Cort.Tn FTP 136404203a83SThomas Cortserver as a 136504203a83SThomas Cort.Dv SITE 136604203a83SThomas Cortcommand. 136704203a83SThomas Cort.It Ic size Ar remote-file 136804203a83SThomas CortReturn size of 136904203a83SThomas Cort.Ar remote-file 137004203a83SThomas Corton remote machine. 137104203a83SThomas Cort.It Ic sndbuf Ar size 137204203a83SThomas CortSet the size of the socket send buffer to 137304203a83SThomas Cort.Ar size . 137404203a83SThomas Cort.It Ic status 137504203a83SThomas CortShow the current status of 137604203a83SThomas Cort.Nm ftp . 137704203a83SThomas Cort.It Ic struct Ar struct-name 137804203a83SThomas CortSet the file transfer 137904203a83SThomas Cort.Ar structure 138004203a83SThomas Cortto 138104203a83SThomas Cort.Ar struct-name . 138204203a83SThomas CortThe default (and only supported) 138304203a83SThomas Cortstructure is 138404203a83SThomas Cort.Dq file . 138504203a83SThomas Cort.It Ic sunique 138604203a83SThomas CortToggle storing of files on remote machine under unique file names. 138704203a83SThomas CortThe remote 138804203a83SThomas Cort.Tn FTP 138904203a83SThomas Cortserver must support 139004203a83SThomas Cort.Tn FTP 139104203a83SThomas Cortprotocol 139204203a83SThomas Cort.Dv STOU 139304203a83SThomas Cortcommand for 139404203a83SThomas Cortsuccessful completion. 139504203a83SThomas CortThe remote server will report unique name. 139604203a83SThomas CortDefault value is off. 139704203a83SThomas Cort.It Ic system 139804203a83SThomas CortShow the type of operating system running on the remote machine. 139904203a83SThomas Cort.It Ic tenex 140004203a83SThomas CortSet the file transfer type to that needed to 140104203a83SThomas Corttalk to 140204203a83SThomas Cort.Tn TENEX 140304203a83SThomas Cortmachines. 140404203a83SThomas Cort.It Ic throttle 140504203a83SThomas CortA synonym for 140604203a83SThomas Cort.Ic rate . 140704203a83SThomas Cort.It Ic trace 140804203a83SThomas CortToggle packet tracing. 140904203a83SThomas Cort.It Ic type Op Ar type-name 141004203a83SThomas CortSet the file transfer 141104203a83SThomas Cort.Ic type 141204203a83SThomas Cortto 141304203a83SThomas Cort.Ar type-name . 141404203a83SThomas CortIf no type is specified, the current type 141504203a83SThomas Cortis printed. 141604203a83SThomas CortThe default type is network 141704203a83SThomas Cort.Tn ASCII . 141804203a83SThomas Cort.It Ic umask Op Ar newmask 141904203a83SThomas CortSet the default umask on the remote server to 142004203a83SThomas Cort.Ar newmask . 142104203a83SThomas CortIf 142204203a83SThomas Cort.Ar newmask 142304203a83SThomas Cortis omitted, the current umask is printed. 142404203a83SThomas Cort.It Ic unset Ar option 142504203a83SThomas CortUnset 142604203a83SThomas Cort.Ar option . 142704203a83SThomas CortRefer to 142804203a83SThomas Cort.Ic set 142904203a83SThomas Cortfor more information. 143004203a83SThomas Cort.It Ic usage Ar command 143104203a83SThomas CortPrint the usage message for 143204203a83SThomas Cort.Ar command . 143304203a83SThomas Cort.It Ic user Ar user-name Oo Ar password Oo Ar account Oc Oc 143404203a83SThomas CortIdentify yourself to the remote 143504203a83SThomas Cort.Tn FTP 143604203a83SThomas Cortserver. 143704203a83SThomas CortIf the 143804203a83SThomas Cort.Ar password 143904203a83SThomas Cortis not specified and the server requires it, 144004203a83SThomas Cort.Nm 144104203a83SThomas Cortwill prompt the user for it (after disabling local echo). 144204203a83SThomas CortIf an 144304203a83SThomas Cort.Ar account 144404203a83SThomas Cortfield is not specified, and the 144504203a83SThomas Cort.Tn FTP 144604203a83SThomas Cortserver 144704203a83SThomas Cortrequires it, the user will be prompted for it. 144804203a83SThomas CortIf an 144904203a83SThomas Cort.Ar account 145004203a83SThomas Cortfield is specified, an account command will 145104203a83SThomas Cortbe relayed to the remote server after the login sequence 145204203a83SThomas Cortis completed if the remote server did not require it 145304203a83SThomas Cortfor logging in. 145404203a83SThomas CortUnless 145504203a83SThomas Cort.Nm 145604203a83SThomas Cortis invoked with 145704203a83SThomas Cort.Dq auto-login 145804203a83SThomas Cortdisabled, this process is done automatically on initial connection to the 145904203a83SThomas Cort.Tn FTP 146004203a83SThomas Cortserver. 146104203a83SThomas Cort.It Ic verbose 146204203a83SThomas CortToggle verbose mode. 146304203a83SThomas CortIn verbose mode, all responses from 146404203a83SThomas Cortthe 146504203a83SThomas Cort.Tn FTP 146604203a83SThomas Cortserver are displayed to the user. 146704203a83SThomas CortIn addition, 146804203a83SThomas Cortif verbose is on, when a file transfer completes, statistics 146904203a83SThomas Cortregarding the efficiency of the transfer are reported. 147004203a83SThomas CortBy default, 147104203a83SThomas Cortverbose is on. 147204203a83SThomas Cort.It Ic xferbuf Ar size 147304203a83SThomas CortSet the size of the socket send and receive buffers to 147404203a83SThomas Cort.Ar size . 147504203a83SThomas Cort.It Ic \&? Op Ar command 147604203a83SThomas CortA synonym for 147704203a83SThomas Cort.Ic help . 147804203a83SThomas Cort.El 147904203a83SThomas Cort.Pp 148004203a83SThomas CortCommand arguments which have embedded spaces may be quoted with 148104203a83SThomas Cortquote 148204203a83SThomas Cort.Sq \&" 148304203a83SThomas Cortmarks. 148404203a83SThomas Cort.Pp 148504203a83SThomas CortCommands which toggle settings can take an explicit 148604203a83SThomas Cort.Ic on 148704203a83SThomas Cortor 148804203a83SThomas Cort.Ic off 148904203a83SThomas Cortargument to force the setting appropriately. 149004203a83SThomas Cort.Pp 149104203a83SThomas CortCommands which take a byte count as an argument 149204203a83SThomas Cort(e.g., 149304203a83SThomas Cort.Ic hash , 149404203a83SThomas Cort.Ic rate , 149504203a83SThomas Cortand 149604203a83SThomas Cort.Ic xferbuf ) 149704203a83SThomas Cortsupport an optional suffix on the argument which changes the 149804203a83SThomas Cortinterpretation of the argument. 149904203a83SThomas CortSupported suffixes are: 150004203a83SThomas Cort.Bl -tag -width 3n -offset indent -compact 150104203a83SThomas Cort.It Li b 150204203a83SThomas CortCauses no modification. 150304203a83SThomas Cort(Optional) 150404203a83SThomas Cort.It Li k 150504203a83SThomas CortKilo; multiply the argument by 1024 150604203a83SThomas Cort.It Li m 150704203a83SThomas CortMega; multiply the argument by 1048576 150804203a83SThomas Cort.It Li g 150904203a83SThomas CortGiga; multiply the argument by 1073741824 151004203a83SThomas Cort.El 151104203a83SThomas Cort.Pp 151204203a83SThomas CortIf 151304203a83SThomas Cort.Nm 151404203a83SThomas Cortreceives a 151504203a83SThomas Cort.Dv SIGINFO 151604203a83SThomas Cort(see the 151704203a83SThomas Cort.Dq status 151804203a83SThomas Cortargument of 151904203a83SThomas Cort.Xr stty 1 ) 152004203a83SThomas Cortor 152104203a83SThomas Cort.Dv SIGQUIT 152204203a83SThomas Cortsignal whilst a transfer is in progress, the current transfer rate 152304203a83SThomas Cortstatistics will be written to the standard error output, in the 152404203a83SThomas Cortsame format as the standard completion message. 152504203a83SThomas Cort.Sh AUTO-FETCHING FILES 152604203a83SThomas CortIn addition to standard commands, this version of 152704203a83SThomas Cort.Nm 152804203a83SThomas Cortsupports an auto-fetch feature. 152904203a83SThomas CortTo enable auto-fetch, simply pass the list of hostnames/files 153004203a83SThomas Corton the command line. 153104203a83SThomas Cort.Pp 153204203a83SThomas CortThe following formats are valid syntax for an auto-fetch element: 153304203a83SThomas Cort.Bl -tag -width "FOO " 153404203a83SThomas Cort.\" [user@]host:[path][/] 153504203a83SThomas Cort.It Oo Ar user Ns Li \&@ Oc Ns Ar host Ns Li \&: Ns Oo Ar path Oc \ 153604203a83SThomas CortNs Oo Li / Oc 153704203a83SThomas Cort.Dq Classic 153804203a83SThomas Cort.Tn FTP 153904203a83SThomas Cortformat. 154004203a83SThomas Cort.Pp 154104203a83SThomas CortIf 154204203a83SThomas Cort.Ar path 154304203a83SThomas Cortcontains a glob character and globbing is enabled, 154404203a83SThomas Cort(see 154504203a83SThomas Cort.Ic glob ) , 154604203a83SThomas Cortthen the equivalent of 154704203a83SThomas Cort.Ql mget path 154804203a83SThomas Cortis performed. 154904203a83SThomas Cort.Pp 155004203a83SThomas CortIf the directory component of 155104203a83SThomas Cort.Ar path 155204203a83SThomas Cortcontains no globbing characters, 155304203a83SThomas Cortit is stored locally with the name basename (see 155404203a83SThomas Cort.Xr basename 1 ) 155504203a83SThomas Cortof 155604203a83SThomas Cort.Ic path , 155704203a83SThomas Cortin the current directory. 155804203a83SThomas CortOtherwise, the full remote name is used as the local name, 155904203a83SThomas Cortrelative to the local root directory. 156004203a83SThomas Cort.\" ftp://[user[:password]@]host[:port]/path[/][;type=X] 156104203a83SThomas Cort.It Li ftp:// Ns Oo Ar user Ns Oo Ns Li \&: Ns Ar password Oc Ns Li \&@ Oc \ 156204203a83SThomas CortNs Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path Ns Oo Li / Oc \ 156304203a83SThomas CortNs Oo Li ;type= Ns Ar X Oc 156404203a83SThomas CortAn 156504203a83SThomas Cort.Tn FTP 156604203a83SThomas CortURL, retrieved using the 156704203a83SThomas Cort.Tn FTP 156804203a83SThomas Cortprotocol if 156904203a83SThomas Cort.Ic "set ftp_proxy" 157004203a83SThomas Cortisn't defined. 157104203a83SThomas CortOtherwise, transfer the URL using 157204203a83SThomas Cort.Tn HTTP 157304203a83SThomas Cortvia the proxy defined in 157404203a83SThomas Cort.Ic "set ftp_proxy" . 157504203a83SThomas CortIf 157604203a83SThomas Cort.Ic "set ftp_proxy" 157704203a83SThomas Cortisn't defined and 157804203a83SThomas Cort.Ar user 157904203a83SThomas Cortis given, login as 158004203a83SThomas Cort.Ar user . 158104203a83SThomas CortIn this case, use 158204203a83SThomas Cort.Ar password 158304203a83SThomas Cortif supplied, otherwise prompt the user for one. 158404203a83SThomas Cort.Pp 158504203a83SThomas CortIf a suffix of 158604203a83SThomas Cort.Sq ;type=A 158704203a83SThomas Cortor 158804203a83SThomas Cort.Sq ;type=I 158904203a83SThomas Cortis supplied, then the transfer type will take place as 159004203a83SThomas Cortascii or binary (respectively). 159104203a83SThomas CortThe default transfer type is binary. 159204203a83SThomas Cort.Pp 159304203a83SThomas CortIn order to be compliant with 159404203a83SThomas Cort.Li RFC 3986 , 159504203a83SThomas Cort.Nm 159604203a83SThomas Cortinterprets the 159704203a83SThomas Cort.Ar path 159804203a83SThomas Cortpart of an 159904203a83SThomas Cort.Dq ftp:// 160004203a83SThomas Cortauto-fetch URL as follows: 160104203a83SThomas Cort.Bl -bullet 160204203a83SThomas Cort.It 160304203a83SThomas CortThe 160404203a83SThomas Cort.Sq Li / 160504203a83SThomas Cortimmediately after the 160604203a83SThomas Cort.Ar host Ns Oo Li \&: Ns Ar port Oc 160704203a83SThomas Cortis interpreted as a separator before the 160804203a83SThomas Cort.Ar path , 160904203a83SThomas Cortand not as part of the 161004203a83SThomas Cort.Ar path 161104203a83SThomas Cortitself. 161204203a83SThomas Cort.It 161304203a83SThomas CortThe 161404203a83SThomas Cort.Ar path 161504203a83SThomas Cortis interpreted as a 161604203a83SThomas Cort.So Li / Sc Ns -separated 161704203a83SThomas Cortlist of name components. 161804203a83SThomas CortFor all but the last such component, 161904203a83SThomas Cort.Nm 162004203a83SThomas Cortperforms the equivalent of a 162104203a83SThomas Cort.Ic cd 162204203a83SThomas Cortcommand. 162304203a83SThomas CortFor the last path component, 162404203a83SThomas Cort.Nm 162504203a83SThomas Cortperforms the equivalent of a 162604203a83SThomas Cort.Ic get 162704203a83SThomas Cortcommand. 162804203a83SThomas Cort.It 162904203a83SThomas CortEmpty name components, 163004203a83SThomas Cortwhich result from 163104203a83SThomas Cort.Sq Li // 163204203a83SThomas Cortwithin the 163304203a83SThomas Cort.Ar path , 163404203a83SThomas Cortor from an extra 163504203a83SThomas Cort.Sq Li / 163604203a83SThomas Cortat the beginning of the 163704203a83SThomas Cort.Ar path , 163804203a83SThomas Cortwill cause the equivalent of a 163904203a83SThomas Cort.Ic cd 164004203a83SThomas Cortcommand without a directory name. 164104203a83SThomas CortThis is unlikely to be useful. 164204203a83SThomas Cort.It 164304203a83SThomas CortAny 164404203a83SThomas Cort.Sq Li \&% Ns Ar XX 164504203a83SThomas Cortcodes 164604203a83SThomas Cort(per 164704203a83SThomas Cort.Li RFC 3986 ) 164804203a83SThomas Cortwithin the path components are decoded, with 164904203a83SThomas Cort.Ar XX 165004203a83SThomas Cortrepresenting a character code in hexadecimal. 165104203a83SThomas CortThis decoding takes place after the 165204203a83SThomas Cort.Ar path 165304203a83SThomas Corthas been split into components, 165404203a83SThomas Cortbut before each component is used in the equivalent of a 165504203a83SThomas Cort.Ic cd 165604203a83SThomas Cortor 165704203a83SThomas Cort.Ic get 165804203a83SThomas Cortcommand. 165904203a83SThomas CortSome often-used codes are 166004203a83SThomas Cort.Sq Li \&%2F 166104203a83SThomas Cort(which represents 166204203a83SThomas Cort.Sq Li / ) 166304203a83SThomas Cortand 166404203a83SThomas Cort.Sq Li \&%7E 166504203a83SThomas Cort(which represents 166604203a83SThomas Cort.Sq Li ~ ) . 166704203a83SThomas Cort.El 166804203a83SThomas Cort.Pp 166904203a83SThomas CortThe above interpretation has the following consequences: 167004203a83SThomas Cort.Bl -bullet 167104203a83SThomas Cort.It 167204203a83SThomas CortThe path is interpreted relative to the 167304203a83SThomas Cortdefault login directory of the specified user or of the 167404203a83SThomas Cort.Sq anonymous 167504203a83SThomas Cortuser. 167604203a83SThomas CortIf the 167704203a83SThomas Cort.Pa / 167804203a83SThomas Cortdirectory is required, use a leading path of 167904203a83SThomas Cort.Dq %2F . 168004203a83SThomas CortIf a user's home directory is required (and the remote server supports 168104203a83SThomas Cortthe syntax), use a leading path of 168204203a83SThomas Cort.Dq %7Euser/ . 168304203a83SThomas CortFor example, to retrieve 168404203a83SThomas Cort.Pa /etc/motd 168504203a83SThomas Cortfrom 168604203a83SThomas Cort.Sq localhost 168704203a83SThomas Cortas the user 168804203a83SThomas Cort.Sq myname 168904203a83SThomas Cortwith the password 169004203a83SThomas Cort.Sq mypass , 169104203a83SThomas Cortuse 169204203a83SThomas Cort.Dq ftp://myname:mypass@localhost/%2fetc/motd 169304203a83SThomas Cort.It 169404203a83SThomas CortThe exact 169504203a83SThomas Cort.Ic cd 169604203a83SThomas Cortand 169704203a83SThomas Cort.Ic get 169804203a83SThomas Cortcommands can be controlled by careful choice of 169904203a83SThomas Cortwhere to use 170004203a83SThomas Cort.Sq / 170104203a83SThomas Cortand where to use 170204203a83SThomas Cort.Sq %2F 170304203a83SThomas Cort(or 170404203a83SThomas Cort.Sq %2f ) . 170504203a83SThomas CortFor example, the following URLs correspond to the 170604203a83SThomas Cortequivalents of the indicated commands: 170704203a83SThomas Cort.Bl -tag -width "ftp://host/%2Fdir1%2Fdir2%2Ffile" 170804203a83SThomas Cort.It ftp://host/dir1/dir2/file 170904203a83SThomas Cort.Dq "cd dir1" , 171004203a83SThomas Cort.Dq "cd dir2" , 171104203a83SThomas Cort.Dq "get file" . 171204203a83SThomas Cort.It ftp://host/%2Fdir1/dir2/file 171304203a83SThomas Cort.Dq "cd /dir1" , 171404203a83SThomas Cort.Dq "cd dir2" , 171504203a83SThomas Cort.Dq "get file" . 171604203a83SThomas Cort.It ftp://host/dir1%2Fdir2/file 171704203a83SThomas Cort.Dq "cd dir1/dir2" , 171804203a83SThomas Cort.Dq "get file" . 171904203a83SThomas Cort.It ftp://host/%2Fdir1%2Fdir2/file 172004203a83SThomas Cort.Dq "cd /dir1/dir2" , 172104203a83SThomas Cort.Dq "get file" . 172204203a83SThomas Cort.It ftp://host/dir1%2Fdir2%2Ffile 172304203a83SThomas Cort.Dq "get dir1/dir2/file" . 172404203a83SThomas Cort.It ftp://host/%2Fdir1%2Fdir2%2Ffile 172504203a83SThomas Cort.Dq "get /dir1/dir2/file" . 172604203a83SThomas Cort.El 172704203a83SThomas Cort.It 172804203a83SThomas CortYou must have appropriate access permission for each of the 172904203a83SThomas Cortintermediate directories that is used in the equivalent of a 173004203a83SThomas Cort.Ic cd 173104203a83SThomas Cortcommand. 173204203a83SThomas Cort.El 173304203a83SThomas Cort.\" http://[user[:password]@]host[:port]/path 173404203a83SThomas Cort.It Li http:// Ns Oo Ar user Ns Oo Li \&: Ns Ar password Oc Ns Li \&@ Oc \ 173504203a83SThomas CortNs Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path 173604203a83SThomas CortAn 173704203a83SThomas Cort.Tn HTTP 173804203a83SThomas CortURL, retrieved using the 173904203a83SThomas Cort.Tn HTTP 174004203a83SThomas Cortprotocol. 174104203a83SThomas CortIf 174204203a83SThomas Cort.Ic "set http_proxy" 174304203a83SThomas Cortis defined, it is used as a URL to an 174404203a83SThomas Cort.Tn HTTP 174504203a83SThomas Cortproxy server. 174604203a83SThomas CortIf 174704203a83SThomas Cort.Tn HTTP 174804203a83SThomas Cortauthorization is required to retrieve 174904203a83SThomas Cort.Ar path , 175004203a83SThomas Cortand 175104203a83SThomas Cort.Sq user 175204203a83SThomas Cort(and optionally 175304203a83SThomas Cort.Sq password ) 175404203a83SThomas Cortis in the URL, use them for the first attempt to authenticate. 175504203a83SThomas Cort.\" https://[user[:password]@]host[:port]/path 175604203a83SThomas Cort.It Li https:// Ns Oo Ar user Ns Oo Li \&: Ns Ar password Oc Ns Li \&@ Oc \ 175704203a83SThomas CortNs Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path 175804203a83SThomas CortAn 175904203a83SThomas Cort.Tn HTTPS 176004203a83SThomas CortURL, retrieved using the 176104203a83SThomas Cort.Tn HTTPS 176204203a83SThomas Cortprotocol. 176304203a83SThomas CortIf 176404203a83SThomas Cort.Ic "set https_proxy" 176504203a83SThomas Cortis defined, it is used as a URL to an 176604203a83SThomas Cort.Tn HTTPS 176704203a83SThomas Cortproxy server. 176804203a83SThomas CortIf 176904203a83SThomas Cort.Tn HTTPS 177004203a83SThomas Cortauthorization is required to retrieve 177104203a83SThomas Cort.Ar path , 177204203a83SThomas Cortand 177304203a83SThomas Cort.Sq user 177404203a83SThomas Cort(and optionally 177504203a83SThomas Cort.Sq password ) 177604203a83SThomas Cortis in the URL, use them for the first attempt to authenticate. 177704203a83SThomas CortThere is currently no certificate validation and verification. 177804203a83SThomas Cort.\" file:///path 177904203a83SThomas Cort.It Li file:/// Ns Ar path 178004203a83SThomas CortA local URL, copied from 178104203a83SThomas Cort.Pa / Ns Ar path 178204203a83SThomas Corton the local host. 178304203a83SThomas Cort.\" about: 178404203a83SThomas Cort.It Li about: Ns Ar topic 178504203a83SThomas CortDisplay information regarding 178604203a83SThomas Cort.Ar topic ; 178704203a83SThomas Cortno file is retrieved for this auto-fetched element. 178804203a83SThomas CortSupported values include: 178904203a83SThomas Cort.Bl -tag -width "about:version" 179004203a83SThomas Cort.It Li about:ftp 179104203a83SThomas CortInformation about 179204203a83SThomas Cort.Nm ftp . 179304203a83SThomas Cort.It Li about:version 179404203a83SThomas CortThe version of 179504203a83SThomas Cort.Nm ftp . 179604203a83SThomas CortUseful to provide when reporting problems. 179704203a83SThomas Cort.El 179804203a83SThomas Cort.El 179904203a83SThomas Cort.Pp 180004203a83SThomas CortUnless noted otherwise above, and 180104203a83SThomas Cort.Fl o Ar output 180204203a83SThomas Cortis not given, the file is stored in the current directory as the 180304203a83SThomas Cort.Xr basename 1 180404203a83SThomas Cortof 180504203a83SThomas Cort.Ar path . 180604203a83SThomas CortNote that if a 180704203a83SThomas Cort.Tn HTTP 180804203a83SThomas Cortredirect is received, the fetch is retried using the new target URL 180904203a83SThomas Cortsupplied by the server, with a corresponding new 181004203a83SThomas Cort.Ar path . 181104203a83SThomas CortUsing an explicit 181204203a83SThomas Cort.Fl o Ar output 181304203a83SThomas Cortis recommended, to avoid writing to unexpected file names. 181404203a83SThomas Cort.Pp 181504203a83SThomas CortIf a classic format or an 181604203a83SThomas Cort.Tn FTP 181704203a83SThomas CortURL format has a trailing 181804203a83SThomas Cort.Sq / 181904203a83SThomas Cortor an empty 182004203a83SThomas Cort.Ar path 182104203a83SThomas Cortcomponent, then 182204203a83SThomas Cort.Nm 182304203a83SThomas Cortwill connect to the site and 182404203a83SThomas Cort.Ic cd 182504203a83SThomas Cortto the directory given as the path, and leave the user in interactive 182604203a83SThomas Cortmode ready for further input. 182704203a83SThomas CortThis will not work if 182804203a83SThomas Cort.Ic "set ftp_proxy" 182904203a83SThomas Cortis being used. 183004203a83SThomas Cort.Pp 183104203a83SThomas CortDirect 183204203a83SThomas Cort.Tn HTTP 183304203a83SThomas Corttransfers use HTTP 1.1. 183404203a83SThomas CortProxied 183504203a83SThomas Cort.Tn FTP 183604203a83SThomas Cortand 183704203a83SThomas Cort.Tn HTTP 183804203a83SThomas Corttransfers use HTTP 1.0. 183904203a83SThomas Cort.Pp 184004203a83SThomas CortIf 184104203a83SThomas Cort.Fl R 184204203a83SThomas Cortis given, all auto-fetches that don't go via the 184304203a83SThomas Cort.Tn FTP 184404203a83SThomas Cortor 184504203a83SThomas Cort.Tn HTTP 184604203a83SThomas Cortproxies will be restarted. 184704203a83SThomas CortFor 184804203a83SThomas Cort.Tn FTP , 184904203a83SThomas Cortthis is implemented by using 185004203a83SThomas Cort.Nm reget 185104203a83SThomas Cortinstead of 185204203a83SThomas Cort.Nm get . 185304203a83SThomas CortFor 185404203a83SThomas Cort.Tn HTTP , 185504203a83SThomas Cortthis is implemented by using the 185604203a83SThomas Cort.Sq "Range: bytes=" 185704203a83SThomas Cort.Tn "HTTP/1.1" 185804203a83SThomas Cortdirective. 185904203a83SThomas Cort.Pp 186004203a83SThomas CortIf WWW or proxy WWW authentication is required, you will be prompted 186104203a83SThomas Cortto enter a username and password to authenticate with. 186204203a83SThomas Cort.Pp 186304203a83SThomas CortWhen specifying IPv6 numeric addresses in a URL, you need to 186404203a83SThomas Cortsurround the address in square brackets. 186504203a83SThomas CortE.g.: 186604203a83SThomas Cort.Dq ftp://[::1]:21/ . 186704203a83SThomas CortThis is because colons are used in IPv6 numeric address as well as 186804203a83SThomas Cortbeing the separator for the port number. 186904203a83SThomas Cort.Sh ABORTING A FILE TRANSFER 187004203a83SThomas CortTo abort a file transfer, use the terminal interrupt key 187104203a83SThomas Cort(usually Ctrl-C). 187204203a83SThomas CortSending transfers will be immediately halted. 187304203a83SThomas CortReceiving transfers will be halted by sending an 187404203a83SThomas Cort.Tn FTP 187504203a83SThomas Cortprotocol 187604203a83SThomas Cort.Dv ABOR 187704203a83SThomas Cortcommand to the remote server, and discarding any further data received. 187804203a83SThomas CortThe speed at which this is accomplished depends upon the remote 187904203a83SThomas Cortserver's support for 188004203a83SThomas Cort.Dv ABOR 188104203a83SThomas Cortprocessing. 188204203a83SThomas CortIf the remote server does not support the 188304203a83SThomas Cort.Dv ABOR 188404203a83SThomas Cortcommand, the prompt will not appear until the remote server has completed 188504203a83SThomas Cortsending the requested file. 188604203a83SThomas Cort.Pp 188704203a83SThomas CortIf the terminal interrupt key sequence is used whilst 188804203a83SThomas Cort.Nm 188904203a83SThomas Cortis awaiting a reply from the remote server for the ABOR processing, 189004203a83SThomas Cortthen the connection will be closed. 189104203a83SThomas CortThis is different from the traditional behaviour (which ignores the 189204203a83SThomas Cortterminal interrupt during this phase), but is considered more useful. 189304203a83SThomas Cort.Sh FILE NAMING CONVENTIONS 189404203a83SThomas CortFiles specified as arguments to 189504203a83SThomas Cort.Nm 189604203a83SThomas Cortcommands are processed according to the following rules. 189704203a83SThomas Cort.Bl -enum 189804203a83SThomas Cort.It 189904203a83SThomas CortIf the file name 190004203a83SThomas Cort.Sq Fl 190104203a83SThomas Cortis specified, the 190204203a83SThomas Cort.Ar stdin 190304203a83SThomas Cort(for reading) or 190404203a83SThomas Cort.Ar stdout 190504203a83SThomas Cort(for writing) is used. 190604203a83SThomas Cort.It 190704203a83SThomas CortIf the first character of the file name is 190804203a83SThomas Cort.Sq \&| , 190904203a83SThomas Cortthe 191004203a83SThomas Cortremainder of the argument is interpreted as a shell command. 191104203a83SThomas Cort.Nm 191204203a83SThomas Cortthen forks a shell, using 191304203a83SThomas Cort.Xr popen 3 191404203a83SThomas Cortwith the argument supplied, and reads (writes) from the stdout 191504203a83SThomas Cort(stdin). 191604203a83SThomas CortIf the shell command includes spaces, the argument 191704203a83SThomas Cortmust be quoted; e.g. 191804203a83SThomas Cort.Dq Qq Li \&| ls\ \-lt . 191904203a83SThomas CortA particularly 192004203a83SThomas Cortuseful example of this mechanism is: 192104203a83SThomas Cort.Dq Li dir \&"\&" \&|more . 192204203a83SThomas Cort.It 192304203a83SThomas CortFailing the above checks, if 192404203a83SThomas Cort.Dq globbing 192504203a83SThomas Cortis enabled, local file names are expanded according to the rules 192604203a83SThomas Cortused in the 192704203a83SThomas Cort.Xr csh 1 ; 192804203a83SThomas Cortsee the 192904203a83SThomas Cort.Ic glob 193004203a83SThomas Cortcommand. 193104203a83SThomas CortIf the 193204203a83SThomas Cort.Nm 193304203a83SThomas Cortcommand expects a single local file (e.g. 193404203a83SThomas Cort.Ic put ) , 193504203a83SThomas Cortonly the first filename generated by the "globbing" operation is used. 193604203a83SThomas Cort.It 193704203a83SThomas CortFor 193804203a83SThomas Cort.Ic mget 193904203a83SThomas Cortcommands and 194004203a83SThomas Cort.Ic get 194104203a83SThomas Cortcommands with unspecified local file names, the local filename is 194204203a83SThomas Cortthe remote filename, which may be altered by a 194304203a83SThomas Cort.Ic case , 194404203a83SThomas Cort.Ic ntrans , 194504203a83SThomas Cortor 194604203a83SThomas Cort.Ic nmap 194704203a83SThomas Cortsetting. 194804203a83SThomas CortThe resulting filename may then be altered if 194904203a83SThomas Cort.Ic runique 195004203a83SThomas Cortis on. 195104203a83SThomas Cort.It 195204203a83SThomas CortFor 195304203a83SThomas Cort.Ic mput 195404203a83SThomas Cortcommands and 195504203a83SThomas Cort.Ic put 195604203a83SThomas Cortcommands with unspecified remote file names, the remote filename is 195704203a83SThomas Cortthe local filename, which may be altered by a 195804203a83SThomas Cort.Ic ntrans 195904203a83SThomas Cortor 196004203a83SThomas Cort.Ic nmap 196104203a83SThomas Cortsetting. 196204203a83SThomas CortThe resulting filename may then be altered by the remote server if 196304203a83SThomas Cort.Ic sunique 196404203a83SThomas Cortis on. 196504203a83SThomas Cort.El 196604203a83SThomas Cort.Sh FILE TRANSFER PARAMETERS 196704203a83SThomas CortThe 196804203a83SThomas Cort.Tn FTP 196904203a83SThomas Cortspecification specifies many parameters which may affect a file transfer. 197004203a83SThomas CortThe 197104203a83SThomas Cort.Ic type 197204203a83SThomas Cortmay be one of 197304203a83SThomas Cort.Dq ascii , 197404203a83SThomas Cort.Dq image 197504203a83SThomas Cort(binary), 197604203a83SThomas Cort.Dq ebcdic , 197704203a83SThomas Cortand 197804203a83SThomas Cort.Dq local byte size 197904203a83SThomas Cort(for 198004203a83SThomas Cort.Tn PDP Ns -10's 198104203a83SThomas Cortand 198204203a83SThomas Cort.Tn PDP Ns -20's 198304203a83SThomas Cortmostly). 198404203a83SThomas Cort.Nm 198504203a83SThomas Cortsupports the ascii and image types of file transfer, 198604203a83SThomas Cortplus local byte size 8 for 198704203a83SThomas Cort.Ic tenex 198804203a83SThomas Cortmode transfers. 198904203a83SThomas Cort.Pp 199004203a83SThomas Cort.Nm 199104203a83SThomas Cortsupports only the default values for the remaining 199204203a83SThomas Cortfile transfer parameters: 199304203a83SThomas Cort.Ic mode , 199404203a83SThomas Cort.Ic form , 199504203a83SThomas Cortand 199604203a83SThomas Cort.Ic struct . 199704203a83SThomas Cort.Sh THE .netrc FILE 199804203a83SThomas CortThe 199904203a83SThomas Cort.Pa .netrc 200004203a83SThomas Cortfile contains login and initialization information 200104203a83SThomas Cortused by the auto-login process. 200204203a83SThomas CortIt resides in the user's home directory, 200304203a83SThomas Cortunless overridden with the 200404203a83SThomas Cort.Fl N Ar netrc 200504203a83SThomas Cortoption, or specified in the 200604203a83SThomas Cort.Ev NETRC 200704203a83SThomas Cortenvironment variable. 200804203a83SThomas CortThe following tokens are recognized; they may be separated by spaces, 200904203a83SThomas Corttabs, or new-lines: 201004203a83SThomas Cort.Bl -tag -width password 201104203a83SThomas Cort.It Ic machine Ar name 201204203a83SThomas CortIdentify a remote machine 201304203a83SThomas Cort.Ar name . 201404203a83SThomas CortThe auto-login process searches the 201504203a83SThomas Cort.Pa .netrc 201604203a83SThomas Cortfile for a 201704203a83SThomas Cort.Ic machine 201804203a83SThomas Corttoken that matches the remote machine specified on the 201904203a83SThomas Cort.Nm 202004203a83SThomas Cortcommand line or as an 202104203a83SThomas Cort.Ic open 202204203a83SThomas Cortcommand argument. 202304203a83SThomas CortOnce a match is made, the subsequent 202404203a83SThomas Cort.Pa .netrc 202504203a83SThomas Corttokens are processed, 202604203a83SThomas Cortstopping when the end of file is reached or another 202704203a83SThomas Cort.Ic machine 202804203a83SThomas Cortor a 202904203a83SThomas Cort.Ic default 203004203a83SThomas Corttoken is encountered. 203104203a83SThomas Cort.It Ic default 203204203a83SThomas CortThis is the same as 203304203a83SThomas Cort.Ic machine 203404203a83SThomas Cort.Ar name 203504203a83SThomas Cortexcept that 203604203a83SThomas Cort.Ic default 203704203a83SThomas Cortmatches any name. 203804203a83SThomas CortThere can be only one 203904203a83SThomas Cort.Ic default 204004203a83SThomas Corttoken, and it must be after all 204104203a83SThomas Cort.Ic machine 204204203a83SThomas Corttokens. 204304203a83SThomas CortThis is normally used as: 204404203a83SThomas Cort.Pp 204504203a83SThomas Cort.Dl default login anonymous password user@site 204604203a83SThomas Cort.Pp 204704203a83SThomas Cortthereby giving the user an automatic anonymous 204804203a83SThomas Cort.Tn FTP 204904203a83SThomas Cortlogin to 205004203a83SThomas Cortmachines not specified in 205104203a83SThomas Cort.Pa .netrc . 205204203a83SThomas CortThis can be overridden 205304203a83SThomas Cortby using the 205404203a83SThomas Cort.Fl n 205504203a83SThomas Cortflag to disable auto-login. 205604203a83SThomas Cort.It Ic login Ar name 205704203a83SThomas CortIdentify a user on the remote machine. 205804203a83SThomas CortIf this token is present, the auto-login process will initiate 205904203a83SThomas Corta login using the specified 206004203a83SThomas Cort.Ar name . 206104203a83SThomas Cort.It Ic password Ar string 206204203a83SThomas CortSupply a password. 206304203a83SThomas CortIf this token is present, the auto-login process will supply the 206404203a83SThomas Cortspecified string if the remote server requires a password as part 206504203a83SThomas Cortof the login process. 206604203a83SThomas CortNote that if this token is present in the 206704203a83SThomas Cort.Pa .netrc 206804203a83SThomas Cortfile for any user other 206904203a83SThomas Cortthan 207004203a83SThomas Cort.Ar anonymous , 207104203a83SThomas Cort.Nm 207204203a83SThomas Cortwill abort the auto-login process if the 207304203a83SThomas Cort.Pa .netrc 207404203a83SThomas Cortis readable by 207504203a83SThomas Cortanyone besides the user. 207604203a83SThomas Cort.It Ic account Ar string 207704203a83SThomas CortSupply an additional account password. 207804203a83SThomas CortIf this token is present, the auto-login process will supply the 207904203a83SThomas Cortspecified string if the remote server requires an additional 208004203a83SThomas Cortaccount password, or the auto-login process will initiate an 208104203a83SThomas Cort.Dv ACCT 208204203a83SThomas Cortcommand if it does not. 208304203a83SThomas Cort.It Ic macdef Ar name 208404203a83SThomas CortDefine a macro. 208504203a83SThomas CortThis token functions like the 208604203a83SThomas Cort.Nm 208704203a83SThomas Cort.Ic macdef 208804203a83SThomas Cortcommand functions. 208904203a83SThomas CortA macro is defined with the specified name; its contents begin with the 209004203a83SThomas Cortnext 209104203a83SThomas Cort.Pa .netrc 209204203a83SThomas Cortline and continue until a blank line (consecutive new-line 209304203a83SThomas Cortcharacters) is encountered. 209404203a83SThomas CortLike the other tokens in the 209504203a83SThomas Cort.Pa .netrc 209604203a83SThomas Cortfile, a 209704203a83SThomas Cort.Ic macdef 209804203a83SThomas Cortis applicable only to the 209904203a83SThomas Cort.Ic machine 210004203a83SThomas Cortdefinition preceding it. 210104203a83SThomas CortA 210204203a83SThomas Cort.Ic macdef 210304203a83SThomas Cortentry cannot be used by multiple 210404203a83SThomas Cort.Ic machine 210504203a83SThomas Cortdefinitions; rather, it must be defined following each 210604203a83SThomas Cort.Ic machine 210704203a83SThomas Cortit is intended to be used with. 210804203a83SThomas CortIf a macro named 210904203a83SThomas Cort.Ic init 211004203a83SThomas Cortis defined, it is automatically executed as the last step in the 211104203a83SThomas Cortauto-login process. 211204203a83SThomas CortFor example, 211304203a83SThomas Cort.Bd -literal -offset indent 211404203a83SThomas Cortdefault 211504203a83SThomas Cortmacdef init 211604203a83SThomas Cortepsv4 off 211704203a83SThomas Cort.Ed 211804203a83SThomas Cort.Pp 211904203a83SThomas Cortfollowed by a blank line. 212004203a83SThomas Cort.El 212104203a83SThomas Cort.Sh COMMAND LINE EDITING 212204203a83SThomas Cort.Nm 212304203a83SThomas Cortsupports interactive command line editing, via the 212404203a83SThomas Cort.Xr editline 3 212504203a83SThomas Cortlibrary. 212604203a83SThomas CortIt is enabled with the 212704203a83SThomas Cort.Ic edit 212804203a83SThomas Cortcommand, and is enabled by default if input is from a tty. 212904203a83SThomas CortPrevious lines can be recalled and edited with the arrow keys, 213004203a83SThomas Cortand other GNU Emacs-style editing keys may be used as well. 213104203a83SThomas Cort.Pp 213204203a83SThomas CortThe 213304203a83SThomas Cort.Xr editline 3 213404203a83SThomas Cortlibrary is configured with a 213504203a83SThomas Cort.Pa .editrc 213604203a83SThomas Cortfile - refer to 213704203a83SThomas Cort.Xr editrc 5 213804203a83SThomas Cortfor more information. 213904203a83SThomas Cort.Pp 214004203a83SThomas CortAn extra key binding is available to 214104203a83SThomas Cort.Nm 214204203a83SThomas Cortto provide context sensitive command and filename completion 214304203a83SThomas Cort(including remote file completion). 214404203a83SThomas CortTo use this, bind a key to the 214504203a83SThomas Cort.Xr editline 3 214604203a83SThomas Cortcommand 214704203a83SThomas Cort.Ic ftp-complete . 214804203a83SThomas CortBy default, this is bound to the TAB key. 214904203a83SThomas Cort.Sh COMMAND LINE PROMPT 215004203a83SThomas CortBy default, 215104203a83SThomas Cort.Nm 215204203a83SThomas Cortdisplays a command line prompt of 215304203a83SThomas Cort.Dq "ftp\*[Gt] " 215404203a83SThomas Cortto the user. 215504203a83SThomas CortThis can be changed with the 215604203a83SThomas Cort.Ic "set prompt" 215704203a83SThomas Cortcommand. 215804203a83SThomas Cort.Pp 215904203a83SThomas CortA prompt can be displayed on the right side of the screen (after the 216004203a83SThomas Cortcommand input) with the 216104203a83SThomas Cort.Ic "set rprompt" 216204203a83SThomas Cortcommand. 216304203a83SThomas Cort.Pp 216404203a83SThomas CortThe following formatting sequences are replaced by the given 216504203a83SThomas Cortinformation: 216604203a83SThomas Cort.Bl -tag -width "%% " -offset indent 216704203a83SThomas Cort.It Li \&%/ 216804203a83SThomas CortThe current remote working directory. 216904203a83SThomas Cort.\" %c[[0]n], %.[[0]n] 217004203a83SThomas Cort.It \&%c Ns Oo Oo Li 0 Oc Ns Ar n Oc , Ns Li \&%. Ns Oo Oo Li 0 Oc Ns Ar n Oc 217104203a83SThomas CortThe trailing component of the current remote working directory, or 217204203a83SThomas Cort.Em n 217304203a83SThomas Corttrailing components if a digit 217404203a83SThomas Cort.Em n 217504203a83SThomas Cortis given. 217604203a83SThomas CortIf 217704203a83SThomas Cort.Em n 217804203a83SThomas Cortbegins with 217904203a83SThomas Cort.Sq 0 , 218004203a83SThomas Cortthe number of skipped components precede the trailing component(s) in 218104203a83SThomas Cortthe format 218204203a83SThomas Cort.\" ``/<number>trailing'' 218304203a83SThomas Cort.Do 218404203a83SThomas Cort.Sm off 218504203a83SThomas Cort.Li / Li \*[Lt] Va number Li \*[Gt] 218604203a83SThomas Cort.Va trailing 218704203a83SThomas Cort.Sm on 218804203a83SThomas Cort.Dc 218904203a83SThomas Cort(for 219004203a83SThomas Cort.Sq \&%c ) 219104203a83SThomas Cortor 219204203a83SThomas Cort.\" ``...trailing'' 219304203a83SThomas Cort.Dq Li \&... Ns Va trailing 219404203a83SThomas Cort(for 219504203a83SThomas Cort.Sq \&%. ) . 219604203a83SThomas Cort.It Li \&%M 219704203a83SThomas CortThe remote host name. 219804203a83SThomas Cort.It Li \&%m 219904203a83SThomas CortThe remote host name, up to the first 220004203a83SThomas Cort.Sq \&. . 220104203a83SThomas Cort.It Li \&%n 220204203a83SThomas CortThe remote user name. 220304203a83SThomas Cort.It Li \&%% 220404203a83SThomas CortA single 220504203a83SThomas Cort.Sq % . 220604203a83SThomas Cort.El 220704203a83SThomas Cort.Sh ENVIRONMENT 220804203a83SThomas Cort.Nm 220904203a83SThomas Cortuses the following environment variables. 221004203a83SThomas Cort.Bl -tag -width "FTPSERVERPORT" 221104203a83SThomas Cort.It Ev FTPANONPASS 221204203a83SThomas CortPassword to send in an anonymous 221304203a83SThomas Cort.Tn FTP 221404203a83SThomas Corttransfer. 221504203a83SThomas CortDefaults to 221604203a83SThomas Cort.Dq Li `whoami`@ . 221704203a83SThomas Cort.It Ev FTPMODE 221804203a83SThomas CortOverrides the default operation mode. 221904203a83SThomas CortSupport values are: 222004203a83SThomas Cort.Bl -tag -width "passive" 222104203a83SThomas Cort.It Cm active 222204203a83SThomas Cortactive mode 222304203a83SThomas Cort.Tn FTP 222404203a83SThomas Cortonly 222504203a83SThomas Cort.It Cm auto 222604203a83SThomas Cortautomatic determination of passive or active (this is the default) 222704203a83SThomas Cort.It Cm gate 222804203a83SThomas Cortgate-ftp mode 222904203a83SThomas Cort.It Cm passive 223004203a83SThomas Cortpassive mode 223104203a83SThomas Cort.Tn FTP 223204203a83SThomas Cortonly 223304203a83SThomas Cort.El 223404203a83SThomas Cort.It Ev FTPPROMPT 223504203a83SThomas CortCommand-line prompt to use. 223604203a83SThomas CortDefaults to 223704203a83SThomas Cort.Dq "ftp\*[Gt] " . 223804203a83SThomas CortRefer to 223904203a83SThomas Cort.Sx COMMAND LINE PROMPT 224004203a83SThomas Cortfor more information. 224104203a83SThomas Cort.It Ev FTPRPROMPT 224204203a83SThomas CortCommand-line right side prompt to use. 224304203a83SThomas CortDefaults to 224404203a83SThomas Cort.Dq "" . 224504203a83SThomas CortRefer to 224604203a83SThomas Cort.Sx COMMAND LINE PROMPT 224704203a83SThomas Cortfor more information. 224804203a83SThomas Cort.It Ev FTPSERVER 224904203a83SThomas CortHost to use as gate-ftp server when 225004203a83SThomas Cort.Ic gate 225104203a83SThomas Cortis enabled. 225204203a83SThomas Cort.It Ev FTPSERVERPORT 225304203a83SThomas CortPort to use when connecting to gate-ftp server when 225404203a83SThomas Cort.Ic gate 225504203a83SThomas Cortis enabled. 225604203a83SThomas CortDefault is port returned by a 225704203a83SThomas Cort.Fn getservbyname 225804203a83SThomas Cortlookup of 225904203a83SThomas Cort.Dq ftpgate/tcp . 226004203a83SThomas Cort.It Ev FTPUSERAGENT 226104203a83SThomas CortThe value to send for the 226204203a83SThomas Cort.Tn HTTP 226304203a83SThomas CortUser-Agent 226404203a83SThomas Cortheader. 226504203a83SThomas Cort.It Ev HOME 226604203a83SThomas CortFor default location of a 226704203a83SThomas Cort.Pa .netrc 226804203a83SThomas Cortfile, if one exists. 226904203a83SThomas Cort.It Ev NETRC 227004203a83SThomas CortAn alternate location of the 227104203a83SThomas Cort.Pa .netrc 227204203a83SThomas Cortfile. 227304203a83SThomas Cort.It Ev PAGER 227404203a83SThomas CortUsed by various commands to display files. 227504203a83SThomas CortDefaults to 227604203a83SThomas Cort.Xr more 1 227704203a83SThomas Cortif empty or not set. 227804203a83SThomas Cort.It Ev SHELL 227904203a83SThomas CortFor default shell. 228004203a83SThomas Cort.It Ev ftp_proxy 228104203a83SThomas CortURL of 228204203a83SThomas Cort.Tn FTP 228304203a83SThomas Cortproxy to use when making 228404203a83SThomas Cort.Tn FTP 228504203a83SThomas CortURL requests 228604203a83SThomas Cort(if not defined, use the standard 228704203a83SThomas Cort.Tn FTP 228804203a83SThomas Cortprotocol). 228904203a83SThomas Cort.Pp 229004203a83SThomas CortSee 229104203a83SThomas Cort.Ev http_proxy 229204203a83SThomas Cortfor further notes about proxy use. 229304203a83SThomas Cort.It Ev http_proxy 229404203a83SThomas CortURL of 229504203a83SThomas Cort.Tn HTTP 229604203a83SThomas Cortproxy to use when making 229704203a83SThomas Cort.Tn HTTP 229804203a83SThomas CortURL requests. 229904203a83SThomas CortIf proxy authentication is required and there is a username and 230004203a83SThomas Cortpassword in this URL, they will automatically be used in the first 230104203a83SThomas Cortattempt to authenticate to the proxy. 230204203a83SThomas Cort.Pp 230304203a83SThomas CortIf 230404203a83SThomas Cort.Dq unsafe 230504203a83SThomas CortURL characters are required in the username or password 230604203a83SThomas Cort(for example 230704203a83SThomas Cort.Sq @ 230804203a83SThomas Cortor 230904203a83SThomas Cort.Sq / ) , 231004203a83SThomas Cortencode them with 231104203a83SThomas Cort.Li RFC 3986 231204203a83SThomas Cort.Sq Li \&% Ns Ar XX 231304203a83SThomas Cortencoding. 231404203a83SThomas Cort.Pp 231504203a83SThomas CortNote that the use of a username and password in 231604203a83SThomas Cort.Ev ftp_proxy 231704203a83SThomas Cortand 231804203a83SThomas Cort.Ev http_proxy 231904203a83SThomas Cortmay be incompatible with other programs that use it 232004203a83SThomas Cort(such as 232104203a83SThomas Cort.Xr lynx 1 ) . 232204203a83SThomas Cort.Pp 232304203a83SThomas Cort.Em NOTE : 232404203a83SThomas Cortthis is not used for interactive sessions, only for command-line 232504203a83SThomas Cortfetches. 232604203a83SThomas Cort.It Ev no_proxy 232704203a83SThomas CortA space or comma separated list of hosts (or domains) for which 232804203a83SThomas Cortproxying is not to be used. 232904203a83SThomas CortEach entry may have an optional trailing ":port", which restricts 233004203a83SThomas Cortthe matching to connections to that port. 233104203a83SThomas Cort.El 233204203a83SThomas Cort.Sh EXTENDED PASSIVE MODE AND FIREWALLS 233304203a83SThomas CortSome firewall configurations do not allow 233404203a83SThomas Cort.Nm 233504203a83SThomas Cortto use extended passive mode. 233604203a83SThomas CortIf you find that even a simple 233704203a83SThomas Cort.Ic ls 233804203a83SThomas Cortappears to hang after printing a message such as this: 233904203a83SThomas Cort.Pp 234004203a83SThomas Cort.Dl 229 Entering Extended Passive Mode (|||58551|) 234104203a83SThomas Cort.Pp 234204203a83SThomas Cortthen you will need to disable extended passive mode with 234304203a83SThomas Cort.Ic epsv4 off . 234404203a83SThomas CortSee the above section 234504203a83SThomas Cort.Sx The .netrc File 234604203a83SThomas Cortfor an example of how to make this automatic. 234704203a83SThomas Cort.Sh SEE ALSO 234804203a83SThomas Cort.Xr getservbyname 3 , 234904203a83SThomas Cort.Xr editrc 5 , 235004203a83SThomas Cort.Xr services 5 , 235104203a83SThomas Cort.Xr ftpd 8 235204203a83SThomas Cort.Sh STANDARDS 235304203a83SThomas Cort.Nm 235404203a83SThomas Cortattempts to be compliant with: 235504203a83SThomas Cort.Bl -tag -offset indent -width 8n 235604203a83SThomas Cort.It Li RFC 959 235704203a83SThomas Cort.Em File Transfer Protocol 235804203a83SThomas Cort.It Li RFC 1123 235904203a83SThomas Cort.Em Requirements for Internet Hosts - Application and Support 236004203a83SThomas Cort.It Li RFC 1635 236104203a83SThomas Cort.Em How to Use Anonymous FTP 236204203a83SThomas Cort.It Li RFC 2389 236304203a83SThomas Cort.Em Feature negotiation mechanism for the File Transfer Protocol 236404203a83SThomas Cort.It Li RFC 2428 236504203a83SThomas Cort.Em FTP Extensions for IPv6 and NATs 236604203a83SThomas Cort.It Li RFC 2616 236704203a83SThomas Cort.Em Hypertext Transfer Protocol -- HTTP/1.1 236804203a83SThomas Cort.It Li RFC 2822 236904203a83SThomas Cort.Em Internet Message Format 237004203a83SThomas Cort.It Li RFC 3659 237104203a83SThomas Cort.Em Extensions to FTP 237204203a83SThomas Cort.It Li RFC 3986 237304203a83SThomas Cort.Em Uniform Resource Identifier (URI) 237404203a83SThomas Cort.El 237504203a83SThomas Cort.Sh HISTORY 237604203a83SThomas CortThe 237704203a83SThomas Cort.Nm 237804203a83SThomas Cortcommand appeared in 237904203a83SThomas Cort.Bx 4.2 . 238004203a83SThomas Cort.Pp 238104203a83SThomas CortVarious features such as command line editing, context sensitive 238204203a83SThomas Cortcommand and file completion, dynamic progress bar, automatic 238304203a83SThomas Cortfetching of files and URLs, modification time preservation, 238404203a83SThomas Corttransfer rate throttling, configurable command line prompt, 238504203a83SThomas Cortand other enhancements over the standard 238604203a83SThomas Cort.Bx 238704203a83SThomas Cort.Nm 238804203a83SThomas Cortwere implemented in 238904203a83SThomas Cort.Nx 1.3 239004203a83SThomas Cortand later releases 239104203a83SThomas Cortby 239204203a83SThomas Cort.An Luke Mewburn 239304203a83SThomas Cort.Aq lukem@NetBSD.org . 239404203a83SThomas Cort.Pp 239504203a83SThomas CortIPv6 support was added by the WIDE/KAME project 239604203a83SThomas Cort(but may not be present in all non-NetBSD versions of this program, depending 239704203a83SThomas Cortif the operating system supports IPv6 in a similar manner to KAME). 239804203a83SThomas Cort.Sh BUGS 239904203a83SThomas CortCorrect execution of many commands depends upon proper behavior 240004203a83SThomas Cortby the remote server. 240104203a83SThomas Cort.Pp 240204203a83SThomas CortAn error in the treatment of carriage returns 240304203a83SThomas Cortin the 240404203a83SThomas Cort.Bx 4.2 240504203a83SThomas Cortascii-mode transfer code 240604203a83SThomas Corthas been corrected. 240704203a83SThomas CortThis correction may result in incorrect transfers of binary files 240804203a83SThomas Cortto and from 240904203a83SThomas Cort.Bx 4.2 241004203a83SThomas Cortservers using the ascii type. 241104203a83SThomas CortAvoid this problem by using the binary image type. 241204203a83SThomas Cort.Pp 241304203a83SThomas Cort.Nm 241404203a83SThomas Cortassumes that all IPv4 mapped addresses 241504203a83SThomas Cort.Po 241604203a83SThomas CortIPv6 addresses with a form like 241704203a83SThomas Cort.Li ::ffff:10.1.1.1 241804203a83SThomas Cort.Pc 241904203a83SThomas Cortindicate IPv4 destinations which can be handled by 242004203a83SThomas Cort.Dv AF_INET 242104203a83SThomas Cortsockets. 242204203a83SThomas CortHowever, in certain IPv6 network configurations, this assumption is not true. 242304203a83SThomas CortIn such an environment, IPv4 mapped addresses must be passed to 242404203a83SThomas Cort.Dv AF_INET6 242504203a83SThomas Cortsockets directly. 242604203a83SThomas CortFor example, if your site uses a SIIT translator for IPv6-to-IPv4 translation, 242704203a83SThomas Cort.Nm 242804203a83SThomas Cortis unable to support your configuration. 2429