head	1.5;
access;
symbols
	pkgsrc-2014Q3:1.4.0.62
	pkgsrc-2014Q3-base:1.4
	pkgsrc-2014Q2:1.4.0.60
	pkgsrc-2014Q2-base:1.4
	pkgsrc-2014Q1:1.4.0.58
	pkgsrc-2014Q1-base:1.4
	pkgsrc-2013Q4:1.4.0.56
	pkgsrc-2013Q4-base:1.4
	pkgsrc-2013Q3:1.4.0.54
	pkgsrc-2013Q3-base:1.4
	pkgsrc-2013Q2:1.4.0.52
	pkgsrc-2013Q2-base:1.4
	pkgsrc-2013Q1:1.4.0.50
	pkgsrc-2013Q1-base:1.4
	pkgsrc-2012Q4:1.4.0.48
	pkgsrc-2012Q4-base:1.4
	pkgsrc-2012Q3:1.4.0.46
	pkgsrc-2012Q3-base:1.4
	pkgsrc-2012Q2:1.4.0.44
	pkgsrc-2012Q2-base:1.4
	pkgsrc-2012Q1:1.4.0.42
	pkgsrc-2012Q1-base:1.4
	pkgsrc-2011Q4:1.4.0.40
	pkgsrc-2011Q4-base:1.4
	pkgsrc-2011Q3:1.4.0.38
	pkgsrc-2011Q3-base:1.4
	pkgsrc-2011Q2:1.4.0.36
	pkgsrc-2011Q2-base:1.4
	pkgsrc-2011Q1:1.4.0.34
	pkgsrc-2011Q1-base:1.4
	pkgsrc-2010Q4:1.4.0.32
	pkgsrc-2010Q4-base:1.4
	pkgsrc-2010Q3:1.4.0.30
	pkgsrc-2010Q3-base:1.4
	pkgsrc-2010Q2:1.4.0.28
	pkgsrc-2010Q2-base:1.4
	pkgsrc-2010Q1:1.4.0.26
	pkgsrc-2010Q1-base:1.4
	pkgsrc-2009Q4:1.4.0.24
	pkgsrc-2009Q4-base:1.4
	pkgsrc-2009Q3:1.4.0.22
	pkgsrc-2009Q3-base:1.4
	pkgsrc-2009Q2:1.4.0.20
	pkgsrc-2009Q2-base:1.4
	pkgsrc-2009Q1:1.4.0.18
	pkgsrc-2009Q1-base:1.4
	pkgsrc-2008Q4:1.4.0.16
	pkgsrc-2008Q4-base:1.4
	pkgsrc-2008Q3:1.4.0.14
	pkgsrc-2008Q3-base:1.4
	cube-native-xorg:1.4.0.12
	cube-native-xorg-base:1.4
	pkgsrc-2008Q2:1.4.0.10
	pkgsrc-2008Q2-base:1.4
	cwrapper:1.4.0.8
	pkgsrc-2008Q1:1.4.0.6
	pkgsrc-2008Q1-base:1.4
	pkgsrc-2007Q4:1.4.0.4
	pkgsrc-2007Q4-base:1.4
	pkgsrc-2007Q3:1.4.0.2
	pkgsrc-2007Q3-base:1.4
	tnftp-20070806:1.1.1.4
	pkgsrc-2007Q2:1.3.0.18
	pkgsrc-2007Q2-base:1.3
	pkgsrc-2007Q1:1.3.0.16
	pkgsrc-2007Q1-base:1.3
	pkgsrc-2006Q4:1.3.0.14
	pkgsrc-2006Q4-base:1.3
	pkgsrc-2006Q3:1.3.0.12
	pkgsrc-2006Q3-base:1.3
	pkgsrc-2006Q2:1.3.0.10
	pkgsrc-2006Q2-base:1.3
	pkgsrc-2006Q1:1.3.0.8
	pkgsrc-2006Q1-base:1.3
	pkgsrc-2005Q4:1.3.0.6
	pkgsrc-2005Q4-base:1.3
	pkgsrc-2005Q3:1.3.0.4
	pkgsrc-2005Q3-base:1.3
	tnftp-20050625:1.1.1.3
	pkgsrc-2005Q2:1.3.0.2
	pkgsrc-2005Q2-base:1.3
	tnftp-20050610:1.1.1.3
	tnftp-20050514:1.1.1.3
	tnftp-20050511:1.1.1.3
	pkgsrc-2005Q1:1.2.0.2
	pkgsrc-2005Q1-base:1.2
	tnftp-20050103:1.1.1.2
	tnftp-20030825:1.1.1.1
	tnftp:1.1.1
	pkgsrc-2004Q4:1.1.0.8
	pkgsrc-2004Q4-base:1.1
	pkgsrc-2004Q3:1.1.0.6
	pkgsrc-2004Q3-base:1.1
	pkgsrc-2004Q2:1.1.0.4
	pkgsrc-2004Q2-base:1.1
	pkgsrc-2004Q1:1.1.0.2
	pkgsrc-2004Q1-base:1.1;
locks; strict;
comment	@# @;


1.5
date	2014.10.31.18.59.33;	author spz;	state dead;
branches;
next	1.4;
commitid	Dmyx53KiB5rVYnWx;

1.4
date	2007.08.07.02.07.02;	author lukem;	state Exp;
branches
	1.4.62.1;
next	1.3;

1.3
date	2005.05.11.09.58.55;	author lukem;	state Exp;
branches;
next	1.2;

1.2
date	2005.01.04.23.44.24;	author lukem;	state Exp;
branches;
next	1.1;

1.1
date	2004.03.11.13.01.01;	author grant;	state Exp;
branches
	1.1.1.1
	1.1.8.1;
next	;

1.4.62.1
date	2014.11.06.10.15.58;	author tron;	state Exp;
branches;
next	;
commitid	0LBCadcaS1GQS6Xx;

1.1.1.1
date	2003.07.31.07.31.38;	author lukem;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2005.01.03.10.26.31;	author lukem;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2005.05.11.08.11.55;	author lukem;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2007.08.06.04.40.51;	author lukem;	state Exp;
branches;
next	;

1.1.8.1
date	2005.01.07.02.25.55;	author salo;	state Exp;
branches;
next	;


desc
@@


1.5
log
@merge for tnftp-20141031
@
text
@FTP(1)                  NetBSD General Commands Manual                  FTP(1)

NNAAMMEE
     ffttpp -- Internet file transfer program

SSYYNNOOPPSSIISS
     ffttpp [--4466AAaaddeeffggiinnppRRttvvVV] [--NN _n_e_t_r_c] [--oo _o_u_t_p_u_t] [--PP _p_o_r_t] [--qq _q_u_i_t_t_i_m_e]
         [--ss _s_r_c_a_d_d_r] [--rr _r_e_t_r_y] [--TT _d_i_r,_m_a_x[,_i_n_c]] [[_u_s_e_r@@]_h_o_s_t [_p_o_r_t]]
         [[_u_s_e_r@@]_h_o_s_t:[_p_a_t_h][/]] [file:///_p_a_t_h]
         [ftp://[_u_s_e_r[:_p_a_s_s_w_o_r_d]@@]_h_o_s_t[:_p_o_r_t]/_p_a_t_h[/][;type=_X]]
         [http://[_u_s_e_r[:_p_a_s_s_w_o_r_d]@@]_h_o_s_t[:_p_o_r_t]/_p_a_t_h] [_._._.]
     ffttpp --uu _U_R_L _f_i_l_e [_._._.]

DDEESSCCRRIIPPTTIIOONN
     ffttpp is the user interface to the Internet standard File Transfer Proto-
     col.  The program allows a user to transfer files to and from a remote
     network site.

     The last five arguments will fetch a file using the FTP or HTTP proto-
     cols, or by direct copying, into the current directory.  This is ideal
     for scripts.  Refer to _A_U_T_O_-_F_E_T_C_H_I_N_G _F_I_L_E_S below for more information.

     Options may be specified at the command line, or to the command inter-
     preter.

     --44          Forces ffttpp to only use IPv4 addresses.

     --66          Forces ffttpp to only use IPv6 addresses.

     --AA          Force active mode ftp.  By default, ffttpp will try to use pas-
                 sive mode ftp and fall back to active mode if passive is not
                 supported by the server.  This option causes ffttpp to always
                 use an active connection.  It is only useful for connecting
                 to very old servers that do not implement passive mode prop-
                 erly.

     --aa          Causes ffttpp to bypass normal login procedure, and use an
                 anonymous login instead.

     --dd          Enables debugging.

     --ee          Disables command line editing.  This is useful for Emacs
                 ange-ftp mode.

     --ff          Forces a cache reload for transfers that go through the FTP
                 or HTTP proxies.

     --gg          Disables file name globbing.

     --ii          Turns off interactive prompting during multiple file trans-
                 fers.

     --nn          Restrains ffttpp from attempting ``auto-login'' upon initial
                 connection for non auto-fetch transfers.  If auto-login is
                 enabled, ffttpp will check the _._n_e_t_r_c (see below) file in the
                 user's home directory for an entry describing an account on
                 the remote machine.  If no entry exists, ffttpp will prompt for
                 the remote machine login name (default is the user identity
                 on the local machine), and, if necessary, prompt for a pass-
                 word and an account with which to login.  To override the
                 auto-login for auto-fetch transfers, specify the username
                 (and optionally, password) as appropriate.

     --NN _n_e_t_r_c    Use _n_e_t_r_c instead of _~_/_._n_e_t_r_c.  Refer to _T_H_E _._n_e_t_r_c _F_I_L_E for
                 more information.

     --oo _o_u_t_p_u_t   When auto-fetching files, save the contents in _o_u_t_p_u_t.
                 _o_u_t_p_u_t is parsed according to the _F_I_L_E _N_A_M_I_N_G _C_O_N_V_E_N_T_I_O_N_S
                 below.  If _o_u_t_p_u_t is not `-' or doesn't start with `|', then
                 only the first file specified will be retrieved into _o_u_t_p_u_t;
                 all other files will be retrieved into the basename of their
                 remote name.

     --pp          Enable passive mode operation for use behind connection fil-
                 tering firewalls.  This option has been deprecated as ffttpp now
                 tries to use passive mode by default, falling back to active
                 mode if the server does not support passive connections.

     --PP _p_o_r_t     Sets the port number to _p_o_r_t.

     --qq _q_u_i_t_t_i_m_e
                 Quit if the connection has stalled for _q_u_i_t_t_i_m_e seconds.

     --rr _w_a_i_t     Retry the connection attempt if it failed, pausing for _w_a_i_t
                 seconds.

     --RR          Restart all non-proxied auto-fetches.

     --ss _s_r_c_a_d_d_r  Uses _s_r_c_a_d_d_r as the local IP address for all connections.

     --tt          Enables packet tracing.

     --TT _d_i_r_e_c_t_i_o_n,_m_a_x_i_m_u_m[,_i_n_c_r_e_m_e_n_t]
                 Set the maximum transfer rate for _d_i_r_e_c_t_i_o_n to _m_a_x_i_m_u_m
                 bytes/second, and if specified, the increment to _i_n_c_r_e_m_e_n_t
                 bytes/second.  Refer to rraattee for more information.

     --uu _U_R_L _f_i_l_e [...]
                 Upload files on the command line to _U_R_L where _U_R_L is one of
                 the ftp URL types as supported by auto-fetch (with an
                 optional target filename for single file uploads), and _f_i_l_e
                 is one or more local files to be uploaded.

     --vv          Enable vveerrbboossee and pprrooggrreessss.  This is the default if output
                 is to a terminal (and in the case of pprrooggrreessss, ffttpp is the
                 foreground process).  Forces ffttpp to show all responses from
                 the remote server, as well as report on data transfer statis-
                 tics.

     --VV          Disable vveerrbboossee and pprrooggrreessss, overriding the default of
                 enabled when output is to a terminal.

     The client host with which ffttpp is to communicate may be specified on the
     command line.  If this is done, ffttpp will immediately attempt to establish
     a connection to an FTP server on that host; otherwise, ffttpp will enter its
     command interpreter and await instructions from the user.  When ffttpp is
     awaiting commands from the user the prompt `ftp>' is provided to the
     user.  The following commands are recognized by ffttpp:

     !! [_c_o_m_m_a_n_d [_a_r_g_s]]
                 Invoke an interactive shell on the local machine.  If there
                 are arguments, the first is taken to be a command to execute
                 directly, with the rest of the arguments as its arguments.

     $$ _m_a_c_r_o_-_n_a_m_e [_a_r_g_s]
                 Execute the macro _m_a_c_r_o_-_n_a_m_e that was defined with the mmaaccddeeff
                 command.  Arguments are passed to the macro unglobbed.

     aaccccoouunntt [_p_a_s_s_w_d]
                 Supply a supplemental password required by a remote system
                 for access to resources once a login has been successfully
                 completed.  If no argument is included, the user will be
                 prompted for an account password in a non-echoing input mode.

     aappppeenndd _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e]
                 Append a local file to a file on the remote machine.  If
                 _r_e_m_o_t_e_-_f_i_l_e is left unspecified, the local file name is used
                 in naming the remote file after being altered by any nnttrraannss
                 or nnmmaapp setting.  File transfer uses the current settings for
                 ttyyppee, ffoorrmmaatt, mmooddee, and ssttrruuccttuurree.

     aasscciiii       Set the file transfer ttyyppee to network ASCII.  This is the
                 default type.

     bbeellll        Arrange that a bell be sounded after each file transfer com-
                 mand is completed.

     bbiinnaarryy      Set the file transfer ttyyppee to support binary image transfer.

     bbyyee         Terminate the FTP session with the remote server and exit
                 ffttpp.  An end of file will also terminate the session and
                 exit.

     ccaassee        Toggle remote computer file name case mapping during ggeett,
                 mmggeett and mmppuutt commands.  When ccaassee is on (default is off),
                 remote computer file names with all letters in upper case are
                 written in the local directory with the letters mapped to
                 lower case.

     ccdd _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y
                 Change the working directory on the remote machine to
                 _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y.

     ccdduupp        Change the remote machine working directory to the parent of
                 the current remote machine working directory.

     cchhmmoodd _m_o_d_e _r_e_m_o_t_e_-_f_i_l_e
                 Change the permission modes of the file _r_e_m_o_t_e_-_f_i_l_e on the
                 remote system to _m_o_d_e.

     cclloossee       Terminate the FTP session with the remote server, and return
                 to the command interpreter.  Any defined macros are erased.

     ccrr          Toggle carriage return stripping during ascii type file
                 retrieval.  Records are denoted by a carriage return/linefeed
                 sequence during ascii type file transfer.  When ccrr is on (the
                 default), carriage returns are stripped from this sequence to
                 conform with the UNIX single linefeed record delimiter.
                 Records on non-UNIX remote systems may contain single line-
                 feeds; when an ascii type transfer is made, these linefeeds
                 may be distinguished from a record delimiter only when ccrr is
                 off.

     ffttpp__ddeebbuugg [_f_t_p___d_e_b_u_g_-_v_a_l_u_e]
                 Toggle debugging mode.  If an optional _f_t_p___d_e_b_u_g_-_v_a_l_u_e is
                 specified it is used to set the debugging level.  When debug-
                 ging is on, ffttpp prints each command sent to the remote
                 machine, preceded by the string `-->'

     ddeelleettee _r_e_m_o_t_e_-_f_i_l_e
                 Delete the file _r_e_m_o_t_e_-_f_i_l_e on the remote machine.

     ddiirr [_r_e_m_o_t_e_-_p_a_t_h [_l_o_c_a_l_-_f_i_l_e]]
                 Print a listing of the contents of a directory on the remote
                 machine.  The listing includes any system-dependent informa-
                 tion that the server chooses to include; for example, most
                 UNIX systems will produce output from the command `ls -l'.
                 If _r_e_m_o_t_e_-_p_a_t_h is left unspecified, the current working
                 directory is used.  If interactive prompting is on, ffttpp will
                 prompt the user to verify that the last argument is indeed
                 the target local file for receiving ddiirr output.  If no local
                 file is specified, or if _l_o_c_a_l_-_f_i_l_e is `--', the output is
                 sent to the terminal.

     ddiissccoonnnneecctt  A synonym for cclloossee.

     eeddiitt        Toggle command line editing, and context sensitive command
                 and file completion.  This is automatically enabled if input
                 is from a terminal, and disabled otherwise.

     eeppssvv44       Toggle the use of the extended EPSV and EPRT commands on IPv4
                 connections; first try EPSV / EPRT, and then PASV / PORT.
                 This is enabled by default.  If an extended command fails
                 then this option will be temporarily disabled for the dura-
                 tion of the current connection, or until eeppssvv44 is executed
                 again.

     eexxiitt        A synonym for bbyyee.

     ffeeaattuurreess    Display what features the remote server supports (using the
                 FEAT command).

     ffggeett _l_o_c_a_l_f_i_l_e
                 Retrieve the files listed in _l_o_c_a_l_f_i_l_e, which has one line
                 per filename.

     ffoorrmm _f_o_r_m_a_t
                 Set the file transfer ffoorrmm to _f_o_r_m_a_t.  The default (and only
                 supported) format is ``non-print''.

     ffttpp _h_o_s_t [_p_o_r_t]
                 A synonym for ooppeenn.

     ggaattee [_h_o_s_t [_p_o_r_t]]
                 Toggle gate-ftp mode, which used to connect through the TIS
                 FWTK and Gauntlet ftp proxies.  This will not be permitted if
                 the gate-ftp server hasn't been set (either explicitly by the
                 user, or from the FTPSERVER environment variable).  If _h_o_s_t
                 is given, then gate-ftp mode will be enabled, and the gate-
                 ftp server will be set to _h_o_s_t.  If _p_o_r_t is also given, that
                 will be used as the port to connect to on the gate-ftp
                 server.

     ggeett _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
                 Retrieve the _r_e_m_o_t_e_-_f_i_l_e and store it on the local machine.
                 If the local file name is not specified, it is given the same
                 name it has on the remote machine, subject to alteration by
                 the current ccaassee, nnttrraannss, and nnmmaapp settings.  The current
                 settings for ttyyppee, ffoorrmm, mmooddee, and ssttrruuccttuurree are used while
                 transferring the file.

     gglloobb        Toggle filename expansion for mmddeelleettee, mmggeett, mmppuutt, and
                 mmrreeggeett.  If globbing is turned off with gglloobb, the file name
                 arguments are taken literally and not expanded.  Globbing for
                 mmppuutt is done as in csh(1).  For mmddeelleettee, mmggeett, and mmrreeggeett,
                 each remote file name is expanded separately on the remote
                 machine and the lists are not merged.  Expansion of a direc-
                 tory name is likely to be different from expansion of the
                 name of an ordinary file: the exact result depends on the
                 foreign operating system and ftp server, and can be previewed
                 by doing `mls remote-files -' Note: mmggeett, mmppuutt and mmrreeggeett are
                 not meant to transfer entire directory subtrees of files.
                 That can be done by transferring a tar(1) archive of the sub-
                 tree (in binary mode).

     hhaasshh [_s_i_z_e]
                 Toggle hash-sign (`#') printing for each data block trans-
                 ferred.  The size of a data block defaults to 1024 bytes.
                 This can be changed by specifying _s_i_z_e in bytes.  Enabling
                 hhaasshh disables pprrooggrreessss.

     hheellpp [_c_o_m_m_a_n_d]
                 Print an informative message about the meaning of _c_o_m_m_a_n_d.
                 If no argument is given, ffttpp prints a list of the known com-
                 mands.

     iiddllee [_s_e_c_o_n_d_s]
                 Set the inactivity timer on the remote server to _s_e_c_o_n_d_s sec-
                 onds.  If _s_e_c_o_n_d_s is omitted, the current inactivity timer is
                 printed.

     iimmaaggee       A synonym for bbiinnaarryy.

     llccdd [_d_i_r_e_c_t_o_r_y]
                 Change the working directory on the local machine.  If no
                 _d_i_r_e_c_t_o_r_y is specified, the user's home directory is used.

     lleessss _f_i_l_e   A synonym for ppaaggee.

     llppaaggee _l_o_c_a_l_-_f_i_l_e
                 Display _l_o_c_a_l_-_f_i_l_e with the program specified by the sseett
                 ppaaggeerr option.

     llppwwdd        Print the working directory on the local machine.

     llss [_r_e_m_o_t_e_-_p_a_t_h [_l_o_c_a_l_-_f_i_l_e]]
                 A synonym for ddiirr.

     mmaaccddeeff _m_a_c_r_o_-_n_a_m_e
                 Define a macro.  Subsequent lines are stored as the macro
                 _m_a_c_r_o_-_n_a_m_e; a null line (consecutive newline characters in a
                 file or carriage returns from the terminal) terminates macro
                 input mode.  There is a limit of 16 macros and 4096 total
                 characters in all defined macros.  Macro names can be a maxi-
                 mum of 8 characters.  Macros are only applicable to the cur-
                 rent session they are defined within (or if defined outside a
                 session, to the session invoked with the next ooppeenn command),
                 and remain defined until a cclloossee command is executed.  To
                 invoke a macro, use the $$ command (see above).

                 The macro processor interprets `$' and `\' as special charac-
                 ters.  A `$' followed by a number (or numbers) is replaced by
                 the corresponding argument on the macro invocation command
                 line.  A `$' followed by an `i' signals the macro processor
                 that the executing macro is to be looped.  On the first pass
                 ``$i'' is replaced by the first argument on the macro invoca-
                 tion command line, on the second pass it is replaced by the
                 second argument, and so on.  A `\' followed by any character
                 is replaced by that character.  Use the `\' to prevent spe-
                 cial treatment of the `$'.

     mmddeelleettee [_r_e_m_o_t_e_-_f_i_l_e_s]
                 Delete the _r_e_m_o_t_e_-_f_i_l_e_s on the remote machine.

     mmddiirr _r_e_m_o_t_e_-_f_i_l_e_s _l_o_c_a_l_-_f_i_l_e
                 Like ddiirr, except multiple remote files may be specified.  If
                 interactive prompting is on, ffttpp will prompt the user to ver-
                 ify that the last argument is indeed the target local file
                 for receiving mmddiirr output.

     mmggeett _r_e_m_o_t_e_-_f_i_l_e_s
                 Expand the _r_e_m_o_t_e_-_f_i_l_e_s on the remote machine and do a ggeett
                 for each file name thus produced.  See gglloobb for details on
                 the filename expansion.  Resulting file names will then be
                 processed according to ccaassee, nnttrraannss, and nnmmaapp settings.
                 Files are transferred into the local working directory, which
                 can be changed with `lcd directory'; new local directories
                 can be created with `! mkdir directory'.

     mmkkddiirr _d_i_r_e_c_t_o_r_y_-_n_a_m_e
                 Make a directory on the remote machine.

     mmllss _r_e_m_o_t_e_-_f_i_l_e_s _l_o_c_a_l_-_f_i_l_e
                 Like llss, except multiple remote files may be specified, and
                 the _l_o_c_a_l_-_f_i_l_e must be specified.  If interactive prompting
                 is on, ffttpp will prompt the user to verify that the last argu-
                 ment is indeed the target local file for receiving mmllss out-
                 put.

     mmllssdd [_r_e_m_o_t_e_-_p_a_t_h]
                 Display the contents of _r_e_m_o_t_e_-_p_a_t_h (which should default to
                 the current directory if not given) in a machine-parsable
                 form, using MLSD.  The format of display can be changed with
                 `remopts mlst ...'.

     mmllsstt [_r_e_m_o_t_e_-_p_a_t_h]
                 Display the details about _r_e_m_o_t_e_-_p_a_t_h (which should default
                 to the current directory if not given) in a machine-parsable
                 form, using MLST.  The format of display can be changed with
                 `remopts mlst ...'.

     mmooddee _m_o_d_e_-_n_a_m_e
                 Set the file transfer mmooddee to _m_o_d_e_-_n_a_m_e.  The default (and
                 only supported) mode is ``stream''.

     mmooddttiimmee _r_e_m_o_t_e_-_f_i_l_e
                 Show the last modification time of the file on the remote
                 machine, in RFC2822 format.

     mmoorree _f_i_l_e   A synonym for ppaaggee.

     mmppuutt _l_o_c_a_l_-_f_i_l_e_s
                 Expand wild cards in the list of local files given as argu-
                 ments and do a ppuutt for each file in the resulting list.  See
                 gglloobb for details of filename expansion.  Resulting file names
                 will then be processed according to nnttrraannss and nnmmaapp settings.

     mmrreeggeett _r_e_m_o_t_e_-_f_i_l_e_s
                 As per mmggeett, but performs a rreeggeett instead of ggeett.

     mmsseenndd _l_o_c_a_l_-_f_i_l_e_s
                 A synonym for mmppuutt.

     nneewweerr _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
                 Get the file only if the modification time of the remote file
                 is more recent that the file on the current system.  If the
                 file does not exist on the current system, the remote file is
                 considered nneewweerr.  Otherwise, this command is identical to
                 _g_e_t.

     nnlliisstt [_r_e_m_o_t_e_-_p_a_t_h [_l_o_c_a_l_-_f_i_l_e]]
                 A synonym for llss.

     nnmmaapp [_i_n_p_a_t_t_e_r_n _o_u_t_p_a_t_t_e_r_n]
                 Set or unset the filename mapping mechanism.  If no arguments
                 are specified, the filename mapping mechanism is unset.  If
                 arguments are specified, remote filenames are mapped during
                 mmppuutt commands and ppuutt commands issued without a specified
                 remote target filename.  If arguments are specified, local
                 filenames are mapped during mmggeett commands and ggeett commands
                 issued without a specified local target filename.  This com-
                 mand is useful when connecting to a non-UNIX remote computer
                 with different file naming conventions or practices.  The
                 mapping follows the pattern set by _i_n_p_a_t_t_e_r_n and _o_u_t_p_a_t_t_e_r_n.
                 [_I_n_p_a_t_t_e_r_n] is a template for incoming filenames (which may
                 have already been processed according to the nnttrraannss and ccaassee
                 settings).  Variable templating is accomplished by including
                 the sequences ``$1'', ``$2'', ...  ``$9'' in _i_n_p_a_t_t_e_r_n.  Use
                 `\' to prevent this special treatment of the `$' character.
                 All other characters are treated literally, and are used to
                 determine the nnmmaapp [_i_n_p_a_t_t_e_r_n] variable values.  For example,
                 given _i_n_p_a_t_t_e_r_n $1.$2 and the remote file name "mydata.data",
                 $1 would have the value "mydata", and $2 would have the value
                 "data".  The _o_u_t_p_a_t_t_e_r_n determines the resulting mapped file-
                 name.  The sequences ``$1'', ``$2'', ...  ``$9'' are replaced
                 by any value resulting from the _i_n_p_a_t_t_e_r_n template.  The
                 sequence ``$0'' is replaced by the original filename.  Addi-
                 tionally, the sequence ``[_s_e_q_1, _s_e_q_2]'' is replaced by [_s_e_q_1]
                 if _s_e_q_1 is not a null string; otherwise it is replaced by
                 _s_e_q_2.  For example, the command

                       nmap $1.$2.$3 [$1,$2].[$2,file]

                 would yield the output filename "myfile.data" for input file-
                 names "myfile.data" and "myfile.data.old", "myfile.file" for
                 the input filename "myfile", and "myfile.myfile" for the
                 input filename ".myfile".  Spaces may be included in
                 _o_u_t_p_a_t_t_e_r_n, as in the example:
                       nmap $1 sed s/  *$// > $1
                 Use the `\' character to prevent special treatment of the
                 `$', `[', `]', and `,' characters.

     nnttrraannss [_i_n_c_h_a_r_s [_o_u_t_c_h_a_r_s]]
                 Set or unset the filename character translation mechanism.
                 If no arguments are specified, the filename character trans-
                 lation mechanism is unset.  If arguments are specified, char-
                 acters in remote filenames are translated during mmppuutt com-
                 mands and ppuutt commands issued without a specified remote tar-
                 get filename.  If arguments are specified, characters in
                 local filenames are translated during mmggeett commands and ggeett
                 commands issued without a specified local target filename.
                 This command is useful when connecting to a non-UNIX remote
                 computer with different file naming conventions or practices.
                 Characters in a filename matching a character in _i_n_c_h_a_r_s are
                 replaced with the corresponding character in _o_u_t_c_h_a_r_s.  If
                 the character's position in _i_n_c_h_a_r_s is longer than the length
                 of _o_u_t_c_h_a_r_s, the character is deleted from the file name.

     ooppeenn _h_o_s_t [_p_o_r_t]
                 Establish a connection to the specified _h_o_s_t FTP server.  An
                 optional port number may be supplied, in which case, ffttpp will
                 attempt to contact an FTP server at that port.  If the sseett
                 aauuttoo--llooggiinn option is on (default), ffttpp will also attempt to
                 automatically log the user in to the FTP server (see below).

     ppaaggee _f_i_l_e   Retrieve ffiillee and display with the program specified by the
                 sseett ppaaggeerr option.

     ppaassssiivvee [aauuttoo]
                 Toggle passive mode (if no arguments are given).  If aauuttoo is
                 given, act as if FTPMODE is set to `auto'.  If passive mode
                 is turned on (default), ffttpp will send a PASV command for all
                 data connections instead of a PORT command.  The PASV command
                 requests that the remote server open a port for the data con-
                 nection and return the address of that port.  The remote
                 server listens on that port and the client connects to it.
                 When using the more traditional PORT command, the client lis-
                 tens on a port and sends that address to the remote server,
                 who connects back to it.  Passive mode is useful when using
                 ffttpp through a gateway router or host that controls the direc-
                 tionality of traffic.  (Note that though FTP servers are
                 required to support the PASV command by RFC1123, some do
                 not.)

     ppddiirr [_r_e_m_o_t_e_-_p_a_t_h]
                 Perform ddiirr [_r_e_m_o_t_e_-_p_a_t_h], and display the result with the
                 program specified by the sseett ppaaggeerr option.

     ppllss [_r_e_m_o_t_e_-_p_a_t_h]
                 Perform llss [_r_e_m_o_t_e_-_p_a_t_h], and display the result with the
                 program specified by the sseett ppaaggeerr option.

     ppmmllssdd [_r_e_m_o_t_e_-_p_a_t_h]
                 Perform mmllssdd [_r_e_m_o_t_e_-_p_a_t_h], and display the result with the
                 program specified by the sseett ppaaggeerr option.

     pprreesseerrvvee    Toggle preservation of modification times on retrieved files.

     pprrooggrreessss    Toggle display of transfer progress bar.  The progress bar
                 will be disabled for a transfer that has _l_o_c_a_l_-_f_i_l_e as `--' or
                 a command that starts with `|'.  Refer to _F_I_L_E _N_A_M_I_N_G
                 _C_O_N_V_E_N_T_I_O_N_S for more information.  Enabling pprrooggrreessss disables
                 hhaasshh.

     pprroommpptt      Toggle interactive prompting.  Interactive prompting occurs
                 during multiple file transfers to allow the user to selec-
                 tively retrieve or store files.  If prompting is turned off
                 (default is on), any mmggeett or mmppuutt will transfer all files,
                 and any mmddeelleettee will delete all files.

                 When prompting is on, the following commands are available at
                 a prompt:

                       aa   Answer `yes' to the current file, and automatically
                           answer `yes' to any remaining files for the current
                           command.

                       nn   Answer `no', and do not transfer the file.

                       pp   Answer `yes' to the current file, and turn off
                           prompt mode (as is ``prompt off'' had been given).

                       qq   Terminate the current operation.

                       yy   Answer `yes', and transfer the file.

                       ??   Display a help message.

                 Any other response will answer `yes' to the current file.

     pprrooxxyy _f_t_p_-_c_o_m_m_a_n_d
                 Execute an ftp command on a secondary control connection.
                 This command allows simultaneous connection to two remote FTP
                 servers for transferring files between the two servers.  The
                 first pprrooxxyy command should be an ooppeenn, to establish the sec-
                 ondary control connection.  Enter the command "proxy ?" to
                 see other FTP commands executable on the secondary connec-
                 tion.  The following commands behave differently when pref-
                 aced by pprrooxxyy: ooppeenn will not define new macros during the
                 auto-login process, cclloossee will not erase existing macro defi-
                 nitions, ggeett and mmggeett transfer files from the host on the
                 primary control connection to the host on the secondary con-
                 trol connection, and ppuutt, mmppuutt, and aappppeenndd transfer files
                 from the host on the secondary control connection to the host
                 on the primary control connection.  Third party file trans-
                 fers depend upon support of the FTP protocol PASV command by
                 the server on the secondary control connection.

     ppuutt _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e]
                 Store a local file on the remote machine.  If _r_e_m_o_t_e_-_f_i_l_e is
                 left unspecified, the local file name is used after process-
                 ing according to any nnttrraannss or nnmmaapp settings in naming the
                 remote file.  File transfer uses the current settings for
                 ttyyppee, ffoorrmmaatt, mmooddee, and ssttrruuccttuurree.

     ppwwdd         Print the name of the current working directory on the remote
                 machine.

     qquuiitt        A synonym for bbyyee.

     qquuoottee _a_r_g_1 _a_r_g_2 _._._.
                 The arguments specified are sent, verbatim, to the remote FTP
                 server.

     rraattee _d_i_r_e_c_t_i_o_n [_m_a_x_i_m_u_m [_i_n_c_r_e_m_e_n_t]]
                 Throttle the maximum transfer rate to _m_a_x_i_m_u_m bytes/second.
                 If _m_a_x_i_m_u_m is 0, disable the throttle.

                 _d_i_r_e_c_t_i_o_n may be one of:
                       aallll  Both directions.
                       ggeett  Incoming transfers.
                       ppuutt  Outgoing transfers.

                 _m_a_x_i_m_u_m can be modified on the fly by _i_n_c_r_e_m_e_n_t bytes
                 (default: 1024) each time a given signal is received:

                       SIGUSR1  Increment _m_a_x_i_m_u_m by _i_n_c_r_e_m_e_n_t bytes.

                       SIGUSR2  Decrement _m_a_x_i_m_u_m by _i_n_c_r_e_m_e_n_t bytes.  The
                                result must be a positive number.

                 If _m_a_x_i_m_u_m is not supplied, the current throttle rates are
                 displayed.

                 Note: rraattee is not yet implemented for ascii mode transfers.

     rrccvvbbuuff _s_i_z_e
                 Set the size of the socket receive buffer to _s_i_z_e.

     rreeccvv _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
                 A synonym for ggeett.

     rreeggeett _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
                 rreeggeett acts like ggeett, except that if _l_o_c_a_l_-_f_i_l_e exists and is
                 smaller than _r_e_m_o_t_e_-_f_i_l_e, _l_o_c_a_l_-_f_i_l_e is presumed to be a par-
                 tially transferred copy of _r_e_m_o_t_e_-_f_i_l_e and the transfer is
                 continued from the apparent point of failure.  This command
                 is useful when transferring very large files over networks
                 that are prone to dropping connections.

     rreemmooppttss _c_o_m_m_a_n_d [_c_o_m_m_a_n_d_-_o_p_t_i_o_n_s]
                 Set options on the remote FTP server for _c_o_m_m_a_n_d to
                 _c_o_m_m_a_n_d_-_o_p_t_i_o_n_s (whose absence is handled on a command-spe-
                 cific basis).  Remote FTP commands known to support options
                 include: `MLST' (used for MLSD and MLST).

     rreennaammee [_f_r_o_m [_t_o]]
                 Rename the file _f_r_o_m on the remote machine, to the file _t_o.

     rreesseett       Clear reply queue.  This command re-synchronizes com-
                 mand/reply sequencing with the remote FTP server.  Resynchro-
                 nization may be necessary following a violation of the FTP
                 protocol by the remote server.

     rreessttaarrtt _m_a_r_k_e_r
                 Restart the immediately following ggeett or ppuutt at the indicated
                 _m_a_r_k_e_r.  On UNIX systems, marker is usually a byte offset
                 into the file.

     rrhheellpp [_c_o_m_m_a_n_d_-_n_a_m_e]
                 Request help from the remote FTP server.  If a _c_o_m_m_a_n_d_-_n_a_m_e
                 is specified it is supplied to the server as well.

     rrmmddiirr _d_i_r_e_c_t_o_r_y_-_n_a_m_e
                 Delete a directory on the remote machine.

     rrssttaattuuss [_r_e_m_o_t_e_-_f_i_l_e]
                 With no arguments, show status of remote machine.  If
                 _r_e_m_o_t_e_-_f_i_l_e is specified, show status of _r_e_m_o_t_e_-_f_i_l_e on
                 remote machine.

     rruunniiqquuee     Toggle storing of files on the local system with unique file-
                 names.  If a file already exists with a name equal to the
                 target local filename for a ggeett or mmggeett command, a ".1" is
                 appended to the name.  If the resulting name matches another
                 existing file, a ".2" is appended to the original name.  If
                 this process continues up to ".99", an error message is
                 printed, and the transfer does not take place.  The generated
                 unique filename will be reported.  Note that rruunniiqquuee will not
                 affect local files generated from a shell command (see
                 below).  The default value is off.

     sseenndd _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e]
                 A synonym for ppuutt.

     sseennddppoorrtt    Toggle the use of PORT commands.  By default, ffttpp will
                 attempt to use a PORT command when establishing a connection
                 for each data transfer.  The use of PORT commands can prevent
                 delays when performing multiple file transfers.  If the PORT
                 command fails, ffttpp will use the default data port.  When the
                 use of PORT commands is disabled, no attempt will be made to
                 use PORT commands for each data transfer.  This is useful for
                 certain FTP implementations which do ignore PORT commands
                 but, incorrectly, indicate they've been accepted.

     sseett [_o_p_t_i_o_n _v_a_l_u_e]
                 Set _o_p_t_i_o_n to _v_a_l_u_e.  If _o_p_t_i_o_n and _v_a_l_u_e are not given, dis-
                 play all of the options and their values.  The currently sup-
                 ported options are:

                       aannoonnppaassss    Defaults to $FTPANONPASS

                       ffttpp__pprrooxxyy   Defaults to $ftp_proxy.

                       hhttttpp__pprrooxxyy  Defaults to $http_proxy.

                       nnoo__pprrooxxyy    Defaults to $no_proxy.

                       ppaaggeerr       Defaults to $PAGER.

                       pprroommpptt      Defaults to $FTPPROMPT.

                       rrpprroommpptt     Defaults to $FTPRPROMPT.

     ssiittee _a_r_g_1 _a_r_g_2 _._._.
                 The arguments specified are sent, verbatim, to the remote FTP
                 server as a SITE command.

     ssiizzee _r_e_m_o_t_e_-_f_i_l_e
                 Return size of _r_e_m_o_t_e_-_f_i_l_e on remote machine.

     ssnnddbbuuff _s_i_z_e
                 Set the size of the socket send buffer to _s_i_z_e.

     ssttaattuuss      Show the current status of ffttpp.

     ssttrruucctt _s_t_r_u_c_t_-_n_a_m_e
                 Set the file transfer _s_t_r_u_c_t_u_r_e to _s_t_r_u_c_t_-_n_a_m_e.  The default
                 (and only supported) structure is ``file''.

     ssuunniiqquuee     Toggle storing of files on remote machine under unique file
                 names.  The remote FTP server must support FTP protocol STOU
                 command for successful completion.  The remote server will
                 report unique name.  Default value is off.

     ssyysstteemm      Show the type of operating system running on the remote
                 machine.

     tteenneexx       Set the file transfer type to that needed to talk to TENEX
                 machines.

     tthhrroottttllee    A synonym for rraattee.

     ttrraaccee       Toggle packet tracing.

     ttyyppee [_t_y_p_e_-_n_a_m_e]
                 Set the file transfer ttyyppee to _t_y_p_e_-_n_a_m_e.  If no type is spec-
                 ified, the current type is printed.  The default type is net-
                 work ASCII.

     uummaasskk [_n_e_w_m_a_s_k]
                 Set the default umask on the remote server to _n_e_w_m_a_s_k.  If
                 _n_e_w_m_a_s_k is omitted, the current umask is printed.

     uunnsseett _o_p_t_i_o_n
                 Unset _o_p_t_i_o_n.  Refer to sseett for more information.

     uussaaggee _c_o_m_m_a_n_d
                 Print the usage message for _c_o_m_m_a_n_d.

     uusseerr _u_s_e_r_-_n_a_m_e [_p_a_s_s_w_o_r_d [_a_c_c_o_u_n_t]]
                 Identify yourself to the remote FTP server.  If the _p_a_s_s_w_o_r_d
                 is not specified and the server requires it, ffttpp will prompt
                 the user for it (after disabling local echo).  If an _a_c_c_o_u_n_t
                 field is not specified, and the FTP server requires it, the
                 user will be prompted for it.  If an _a_c_c_o_u_n_t field is speci-
                 fied, an account command will be relayed to the remote server
                 after the login sequence is completed if the remote server
                 did not require it for logging in.  Unless ffttpp is invoked
                 with ``auto-login'' disabled, this process is done automati-
                 cally on initial connection to the FTP server.

     vveerrbboossee     Toggle verbose mode.  In verbose mode, all responses from the
                 FTP server are displayed to the user.  In addition, if ver-
                 bose is on, when a file transfer completes, statistics
                 regarding the efficiency of the transfer are reported.  By
                 default, verbose is on.

     xxffeerrbbuuff _s_i_z_e
                 Set the size of the socket send and receive buffers to _s_i_z_e.

     ?? [_c_o_m_m_a_n_d]
                 A synonym for hheellpp.

     Command arguments which have embedded spaces may be quoted with quote `"'
     marks.

     Commands which toggle settings can take an explicit oonn or ooffff argument to
     force the setting appropriately.

     Commands which take a byte count as an argument (e.g., hhaasshh, rraattee, and
     xxffeerrbbuuff) support an optional suffix on the argument which changes the
     interpretation of the argument.  Supported suffixes are:
           b    Causes no modification.  (Optional)
           k    Kilo; multiply the argument by 1024
           m    Mega; multiply the argument by 1048576
           g    Giga; multiply the argument by 1073741824

     If ffttpp receives a SIGINFO (see the ``status'' argument of stty(1)) or
     SIGQUIT signal whilst a transfer is in progress, the current transfer
     rate statistics will be written to the standard error output, in the same
     format as the standard completion message.

AAUUTTOO--FFEETTCCHHIINNGG FFIILLEESS
     In addition to standard commands, this version of ffttpp supports an auto-
     fetch feature.  To enable auto-fetch, simply pass the list of host-
     names/files on the command line.

     The following formats are valid syntax for an auto-fetch element:

     [_u_s_e_r@@]_h_o_s_t:[_p_a_t_h][/]
           ``Classic'' FTP format.

           If _p_a_t_h contains a glob character and globbing is enabled, (see
           gglloobb), then the equivalent of `mget path' is performed.

           If the directory component of _p_a_t_h contains no globbing characters,
           it is stored locally with the name basename (see basename(1)) of
           ppaatthh, in the current directory.  Otherwise, the full remote name is
           used as the local name, relative to the local root directory.

     ftp://[_u_s_e_r[:_p_a_s_s_w_o_r_d]@@]_h_o_s_t[:_p_o_r_t]/_p_a_t_h[/][;type=_X]
           An FTP URL, retrieved using the FTP protocol if sseett ffttpp__pprrooxxyy isn't
           defined.  Otherwise, transfer the URL using HTTP via the proxy
           defined in sseett ffttpp__pprrooxxyy.  If sseett ffttpp__pprrooxxyy isn't defined and _u_s_e_r
           is given, login as _u_s_e_r.  In this case, use _p_a_s_s_w_o_r_d if supplied,
           otherwise prompt the user for one.

           If a suffix of `;type=A' or `;type=I' is supplied, then the trans-
           fer type will take place as ascii or binary (respectively).  The
           default transfer type is binary.

           In order to be compliant with RFC3986, ffttpp interprets the _p_a_t_h part
           of an ``ftp://'' auto-fetch URL as follows:

           ++oo   The `/' immediately after the _h_o_s_t[:_p_o_r_t] is interpreted as a
               separator before the _p_a_t_h, and not as part of the _p_a_t_h itself.

           ++oo   The _p_a_t_h is interpreted as a `/'-separated list of name compo-
               nents.  For all but the last such component, ffttpp performs the
               equivalent of a ccdd command.  For the last path component, ffttpp
               performs the equivalent of a ggeett command.

           ++oo   Empty name components, which result from `//' within the _p_a_t_h,
               or from an extra `/' at the beginning of the _p_a_t_h, will cause
               the equivalent of a ccdd command without a directory name.  This
               is unlikely to be useful.

           ++oo   Any `%_X_X' codes (per RFC3986) within the path components are
               decoded, with _X_X representing a character code in hexadecimal.
               This decoding takes place after the _p_a_t_h has been split into
               components, but before each component is used in the equivalent
               of a ccdd or ggeett command.  Some often-used codes are `%2F' (which
               represents `/') and `%7E' (which represents `~').

           The above interpretation has the following consequences:

           ++oo   The path is interpreted relative to the default login directory
               of the specified user or of the `anonymous' user.  If the _/
               directory is required, use a leading path of ``%2F''.  If a
               user's home directory is required (and the remote server sup-
               ports the syntax), use a leading path of ``%7Euser/''.  For
               example, to retrieve _/_e_t_c_/_m_o_t_d from `localhost' as the user
               `myname' with the password `mypass', use
               ``ftp://myname:mypass@@localhost/%2fetc/motd''

           ++oo   The exact ccdd and ggeett commands can be controlled by careful
               choice of where to use `/' and where to use `%2F' (or `%2f').
               For example, the following URLs correspond to the equivalents
               of the indicated commands:

               ftp://host/dir1/dir2/file         ``cd dir1'', ``cd dir2'',
                                                 ``get file''.

               ftp://host/%2Fdir1/dir2/file      ``cd /dir1'', ``cd dir2'',
                                                 ``get file''.

               ftp://host/dir1%2Fdir2/file       ``cd dir1/dir2'', ``get
                                                 file''.

               ftp://host/%2Fdir1%2Fdir2/file    ``cd /dir1/dir2'', ``get
                                                 file''.

               ftp://host/dir1%2Fdir2%2Ffile     ``get dir1/dir2/file''.

               ftp://host/%2Fdir1%2Fdir2%2Ffile  ``get /dir1/dir2/file''.

           ++oo   You must have appropriate access permission for each of the
               intermediate directories that is used in the equivalent of a ccdd
               command.

     http://[_u_s_e_r[:_p_a_s_s_w_o_r_d]@@]_h_o_s_t[:_p_o_r_t]/_p_a_t_h
           An HTTP URL, retrieved using the HTTP protocol.  If sseett hhttttpp__pprrooxxyy
           is defined, it is used as a URL to an HTTP proxy server.  If HTTP
           authorization is required to retrieve _p_a_t_h, and `user' (and option-
           ally `password') is in the URL, use them for the first attempt to
           authenticate.

     file:///_p_a_t_h
           A local URL, copied from _/_p_a_t_h on the local host.

     about:_t_o_p_i_c
           Display information regarding _t_o_p_i_c; no file is retrieved for this
           auto-fetched element.  Supported values include:

           about:ftp      Information about ffttpp.

           about:version  The version of ffttpp.  Useful to provide when report-
                          ing problems.

     Unless noted otherwise above, and --oo _o_u_t_p_u_t is not given, the file is
     stored in the current directory as the basename(1) of _p_a_t_h.  Note that if
     a HTTP redirect is received, the fetch is retried using the new target
     URL supplied by the server, with a corresponding new _p_a_t_h.  Using an
     explicit --oo _o_u_t_p_u_t is recommended, to avoid writing to unexpected file
     names.

     If a classic format or an FTP URL format has a trailing `/' or an empty
     _p_a_t_h component, then ffttpp will connect to the site and ccdd to the directory
     given as the path, and leave the user in interactive mode ready for fur-
     ther input.  This will not work if sseett ffttpp__pprrooxxyy is being used.

     Direct HTTP transfers use HTTP 1.1.  Proxied FTP and HTTP transfers use
     HTTP 1.0.

     If --RR is given, all auto-fetches that don't go via the FTP or HTTP prox-
     ies will be restarted.  For FTP, this is implemented by using rreeggeett
     instead of ggeett.  For HTTP, this is implemented by using the `Range:
     bytes=' HTTP/1.1 directive.

     If WWW or proxy WWW authentication is required, you will be prompted to
     enter a username and password to authenticate with.

     When specifying IPv6 numeric addresses in a URL, you need to surround the
     address in square brackets.  E.g.: ``ftp://[::1]:21/''.  This is because
     colons are used in IPv6 numeric address as well as being the separator
     for the port number.

AABBOORRTTIINNGG AA FFIILLEE TTRRAANNSSFFEERR
     To abort a file transfer, use the terminal interrupt key (usually Ctrl-
     C).  Sending transfers will be immediately halted.  Receiving transfers
     will be halted by sending an FTP protocol ABOR command to the remote
     server, and discarding any further data received.  The speed at which
     this is accomplished depends upon the remote server's support for ABOR
     processing.  If the remote server does not support the ABOR command, the
     prompt will not appear until the remote server has completed sending the
     requested file.

     If the terminal interrupt key sequence is used whilst ffttpp is awaiting a
     reply from the remote server for the ABOR processing, then the connection
     will be closed.  This is different from the traditional behaviour (which
     ignores the terminal interrupt during this phase), but is considered more
     useful.

FFIILLEE NNAAMMIINNGG CCOONNVVEENNTTIIOONNSS
     Files specified as arguments to ffttpp commands are processed according to
     the following rules.

     1.   If the file name `--' is specified, the _s_t_d_i_n (for reading) or _s_t_d_o_u_t
          (for writing) is used.

     2.   If the first character of the file name is `|', the remainder of the
          argument is interpreted as a shell command.  ffttpp then forks a shell,
          using popen(3) with the argument supplied, and reads (writes) from
          the stdout (stdin).  If the shell command includes spaces, the argu-
          ment must be quoted; e.g.  ``"| ls -lt"''.  A particularly useful
          example of this mechanism is: ``dir "" |more''.

     3.   Failing the above checks, if ``globbing'' is enabled, local file
          names are expanded according to the rules used in the csh(1); see
          the gglloobb command.  If the ffttpp command expects a single local file
          (e.g.  ppuutt), only the first filename generated by the "globbing"
          operation is used.

     4.   For mmggeett commands and ggeett commands with unspecified local file
          names, the local filename is the remote filename, which may be
          altered by a ccaassee, nnttrraannss, or nnmmaapp setting.  The resulting filename
          may then be altered if rruunniiqquuee is on.

     5.   For mmppuutt commands and ppuutt commands with unspecified remote file
          names, the remote filename is the local filename, which may be
          altered by a nnttrraannss or nnmmaapp setting.  The resulting filename may
          then be altered by the remote server if ssuunniiqquuee is on.

FFIILLEE TTRRAANNSSFFEERR PPAARRAAMMEETTEERRSS
     The FTP specification specifies many parameters which may affect a file
     transfer.  The ttyyppee may be one of ``ascii'', ``image'' (binary),
     ``ebcdic'', and ``local byte size'' (for PDP-10's and PDP-20's mostly).
     ffttpp supports the ascii and image types of file transfer, plus local byte
     size 8 for tteenneexx mode transfers.

     ffttpp supports only the default values for the remaining file transfer
     parameters: mmooddee, ffoorrmm, and ssttrruucctt.

TTHHEE ..nneettrrcc FFIILLEE
     The _._n_e_t_r_c file contains login and initialization information used by the
     auto-login process.  It resides in the user's home directory, unless
     overridden with the --NN _n_e_t_r_c option, or specified in the NETRC environ-
     ment variable.  The following tokens are recognized; they may be sepa-
     rated by spaces, tabs, or new-lines:

     mmaacchhiinnee _n_a_m_e
               Identify a remote machine _n_a_m_e.  The auto-login process
               searches the _._n_e_t_r_c file for a mmaacchhiinnee token that matches the
               remote machine specified on the ffttpp command line or as an ooppeenn
               command argument.  Once a match is made, the subsequent _._n_e_t_r_c
               tokens are processed, stopping when the end of file is reached
               or another mmaacchhiinnee or a ddeeffaauulltt token is encountered.

     ddeeffaauulltt   This is the same as mmaacchhiinnee _n_a_m_e except that ddeeffaauulltt matches
               any name.  There can be only one ddeeffaauulltt token, and it must be
               after all mmaacchhiinnee tokens.  This is normally used as:

                     default login anonymous password user@@site

               thereby giving the user an automatic anonymous FTP login to
               machines not specified in _._n_e_t_r_c.  This can be overridden by
               using the --nn flag to disable auto-login.

     llooggiinn _n_a_m_e
               Identify a user on the remote machine.  If this token is
               present, the auto-login process will initiate a login using the
               specified _n_a_m_e.

     ppaasssswwoorrdd _s_t_r_i_n_g
               Supply a password.  If this token is present, the auto-login
               process will supply the specified string if the remote server
               requires a password as part of the login process.  Note that if
               this token is present in the _._n_e_t_r_c file for any user other
               than _a_n_o_n_y_m_o_u_s, ffttpp will abort the auto-login process if the
               _._n_e_t_r_c is readable by anyone besides the user.

     aaccccoouunntt _s_t_r_i_n_g
               Supply an additional account password.  If this token is
               present, the auto-login process will supply the specified
               string if the remote server requires an additional account
               password, or the auto-login process will initiate an ACCT com-
               mand if it does not.

     mmaaccddeeff _n_a_m_e
               Define a macro.  This token functions like the ffttpp mmaaccddeeff com-
               mand functions.  A macro is defined with the specified name;
               its contents begin with the next _._n_e_t_r_c line and continue until
               a blank line (consecutive new-line characters) is encountered.
               Like the other tokens in the _._n_e_t_r_c file, a mmaaccddeeff is applica-
               ble only to the mmaacchhiinnee definition preceding it.  A mmaaccddeeff
               entry cannot be utilized by multiple mmaacchhiinnee definitions;
               rather, it must be defined following each mmaacchhiinnee it is
               intended to be used with.  If a macro named iinniitt is defined, it
               is automatically executed as the last step in the auto-login
               process.  For example,

                     default
                     macdef init
                     epsv4 off

               followed by a blank line.

CCOOMMMMAANNDD LLIINNEE EEDDIITTIINNGG
     ffttpp supports interactive command line editing, via the editline(3)
     library.  It is enabled with the eeddiitt command, and is enabled by default
     if input is from a tty.  Previous lines can be recalled and edited with
     the arrow keys, and other GNU Emacs-style editing keys may be used as
     well.

     The editline(3) library is configured with a _._e_d_i_t_r_c file - refer to
     editrc(5) for more information.

     An extra key binding is available to ffttpp to provide context sensitive
     command and filename completion (including remote file completion).  To
     use this, bind a key to the editline(3) command ffttpp--ccoommpplleettee.  By
     default, this is bound to the TAB key.

CCOOMMMMAANNDD LLIINNEE PPRROOMMPPTT
     By default, ffttpp displays a command line prompt of ``ftp> '' to the user.
     This can be changed with the sseett pprroommpptt command.

     A prompt can be displayed on the right side of the screen (after the com-
     mand input) with the sseett rrpprroommpptt command.

     The following formatting sequences are replaced by the given information:

           %/   The current remote working directory.

           %c[[0]_n],%.[[0]_n]
                The trailing component of the current remote working direc-
                tory, or _n trailing components if a digit _n is given.  If _n
                begins with `0', the number of skipped components precede the
                trailing component(s) in the format ``/<_n_u_m_b_e_r>_t_r_a_i_l_i_n_g'' (for
                `%c') or ``..._t_r_a_i_l_i_n_g'' (for `%.').

           %M   The remote host name.

           %m   The remote host name, up to the first `.'.

           %n   The remote user name.

           %%   A single `%'.

EENNVVIIRROONNMMEENNTT
     ffttpp uses the following environment variables.

     FTPANONPASS    Password to send in an anonymous FTP transfer.  Defaults
                    to ```whoami`@@''.

     FTPMODE        Overrides the default operation mode.  Support values are:

                    aaccttiivvee   active mode FTP only

                    aauuttoo     automatic determination of passive or active
                             (this is the default)

                    ggaattee     gate-ftp mode

                    ppaassssiivvee  passive mode FTP only

     FTPPROMPT      Command-line prompt to use.  Defaults to ``ftp> ''.  Refer
                    to _C_O_M_M_A_N_D _L_I_N_E _P_R_O_M_P_T for more information.

     FTPRPROMPT     Command-line right side prompt to use.  Defaults to ``''.
                    Refer to _C_O_M_M_A_N_D _L_I_N_E _P_R_O_M_P_T for more information.

     FTPSERVER      Host to use as gate-ftp server when ggaattee is enabled.

     FTPSERVERPORT  Port to use when connecting to gate-ftp server when ggaattee
                    is enabled.  Default is port returned by a ggeettsseerrvvbbyynnaammee()
                    lookup of ``ftpgate/tcp''.

     FTPUSERAGENT   The value to send for the HTTP User-Agent header.

     HOME           For default location of a _._n_e_t_r_c file, if one exists.

     NETRC          An alternate location of the _._n_e_t_r_c file.

     PAGER          Used by various commands to display files.  Defaults to
                    more(1) if empty or not set.

     SHELL          For default shell.

     ftp_proxy      URL of FTP proxy to use when making FTP URL requests (if
                    not defined, use the standard FTP protocol).

                    See http_proxy for further notes about proxy use.

     http_proxy     URL of HTTP proxy to use when making HTTP URL requests.
                    If proxy authentication is required and there is a user-
                    name and password in this URL, they will automatically be
                    used in the first attempt to authenticate to the proxy.

                    If ``unsafe'' URL characters are required in the username
                    or password (for example `@@' or `/'), encode them with
                    RFC3986 `%_X_X' encoding.

                    Note that the use of a username and password in ftp_proxy
                    and http_proxy may be incompatible with other programs
                    that use it (such as lynx(1)).

                    _N_O_T_E: this is not used for interactive sessions, only for
                    command-line fetches.

     no_proxy       A space or comma separated list of hosts (or domains) for
                    which proxying is not to be used.  Each entry may have an
                    optional trailing ":port", which restricts the matching to
                    connections to that port.

EEXXTTEENNDDEEDD PPAASSSSIIVVEE MMOODDEE AANNDD FFIIRREEWWAALLLLSS
     Some firewall configurations do not allow ffttpp to use extended passive
     mode.  If you find that even a simple llss appears to hang after printing a
     message such as this:

           229 Entering Extended Passive Mode (|||58551|)

     then you will need to disable extended passive mode with eeppssvv44 ooffff.  See
     the above section _T_h_e _._n_e_t_r_c _F_i_l_e for an example of how to make this
     automatic.

SSEEEE AALLSSOO
     getservbyname(3), editrc(5), services(5), ftpd(8)

SSTTAANNDDAARRDDSS
     ffttpp attempts to be compliant with:

           RFC0959   _F_i_l_e _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l

           RFC1123   _R_e_q_u_i_r_e_m_e_n_t_s _f_o_r _I_n_t_e_r_n_e_t _H_o_s_t_s _- _A_p_p_l_i_c_a_t_i_o_n _a_n_d _S_u_p_p_o_r_t

           RFC1635   _H_o_w _t_o _U_s_e _A_n_o_n_y_m_o_u_s _F_T_P

           RFC2389   _F_e_a_t_u_r_e _n_e_g_o_t_i_a_t_i_o_n _m_e_c_h_a_n_i_s_m _f_o_r _t_h_e _F_i_l_e _T_r_a_n_s_f_e_r
                     _P_r_o_t_o_c_o_l

           RFC2428   _F_T_P _E_x_t_e_n_s_i_o_n_s _f_o_r _I_P_v_6 _a_n_d _N_A_T_s

           RFC2616   _H_y_p_e_r_t_e_x_t _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l _-_- _H_T_T_P_/_1_._1

           RFC2822   _I_n_t_e_r_n_e_t _M_e_s_s_a_g_e _F_o_r_m_a_t

           RFC3659   _E_x_t_e_n_s_i_o_n_s _t_o _F_T_P

           RFC3986   _U_n_i_f_o_r_m _R_e_s_o_u_r_c_e _I_d_e_n_t_i_f_i_e_r _(_U_R_I_)

HHIISSTTOORRYY
     The ffttpp command appeared in 4.2BSD.

     Various features such as command line editing, context sensitive command
     and file completion, dynamic progress bar, automatic fetching of files
     and URLs, modification time preservation, transfer rate throttling, con-
     figurable command line prompt, and other enhancements over the standard
     BSD ffttpp were implemented in NetBSD 1.3 and later releases by Luke Mewburn
     <lukem@@NetBSD.org>.

     IPv6 support was added by the WIDE/KAME project (but may not be present
     in all non-NetBSD versions of this program, depending if the operating
     system supports IPv6 in a similar manner to KAME).

BBUUGGSS
     Correct execution of many commands depends upon proper behavior by the
     remote server.

     An error in the treatment of carriage returns in the 4.2BSD ascii-mode
     transfer code has been corrected.  This correction may result in incor-
     rect transfers of binary files to and from 4.2BSD servers using the ascii
     type.  Avoid this problem by using the binary image type.

     ffttpp assumes that all IPv4 mapped addresses (IPv6 addresses with a form
     like ::ffff:10.1.1.1) indicate IPv4 destinations which can be handled by
     AF_INET sockets.  However, in certain IPv6 network configurations, this
     assumption is not true.  In such an environment, IPv4 mapped addresses
     must be passed to AF_INET6 sockets directly.  For example, if your site
     uses a SIIT translator for IPv6-to-IPv4 translation, ffttpp is unable to
     support your configuration.

NetBSD 3.1.1                     July 18, 2007                    NetBSD 3.1.1
@


1.4
log
@Merge tnftp 20070806.
@
text
@@


1.4.62.1
log
@Apply patch submitted by spz in ticket #4537:
Update "tnftp" package to version 20141031 to fix the security
vulnerability reported in CVE-2014-8517.
@
text
@d1 1183
@


1.3
log
@Merge tnftp 20050511.
(Future merges should be easier as this time I froze the vendor RCSIDs)
@
text
@d8 1
a8 1
         [--rr _r_e_t_r_y] [--TT _d_i_r,_m_a_x[,_i_n_c]] [[_u_s_e_r@@]_h_o_s_t [_p_o_r_t]]
d26 1
a26 1
     --44       Forces ffttpp to only use IPv4 addresses.
d28 1
a28 1
     --66       Forces ffttpp to only use IPv6 addresses.
d30 48
a77 47
     --AA       Force active mode ftp.  By default, ffttpp will try to use passive
              mode ftp and fall back to active mode if passive is not sup-
              ported by the server.  This option causes ffttpp to always use an
              active connection.  It is only useful for connecting to very old
              servers that do not implement passive mode properly.

     --aa       Causes ffttpp to bypass normal login procedure, and use an anony-
              mous login instead.

     --dd       Enables debugging.

     --ee       Disables command line editing.  This is useful for Emacs ange-
              ftp mode.

     --ff       Forces a cache reload for transfers that go through the FTP or
              HTTP proxies.

     --gg       Disables file name globbing.

     --ii       Turns off interactive prompting during multiple file transfers.

     --nn       Restrains ffttpp from attempting ``auto-login'' upon initial con-
              nection for non auto-fetch transfers.  If auto-login is enabled,
              ffttpp will check the _._n_e_t_r_c (see below) file in the user's home
              directory for an entry describing an account on the remote
              machine.  If no entry exists, ffttpp will prompt for the remote
              machine login name (default is the user identity on the local
              machine), and, if necessary, prompt for a password and an
              account with which to login.  To override the auto-login for
              auto-fetch transfers, specify the username (and optionally,
              password) as appropriate.

     --NN _n_e_t_r_c
              Use _n_e_t_r_c instead of _~_/_._n_e_t_r_c.  Refer to _T_H_E _._n_e_t_r_c _F_I_L_E for
              more information.

     --oo _o_u_t_p_u_t
              When auto-fetching files, save the contents in _o_u_t_p_u_t.  _o_u_t_p_u_t
              is parsed according to the _F_I_L_E _N_A_M_I_N_G _C_O_N_V_E_N_T_I_O_N_S below.  If
              _o_u_t_p_u_t is not `-' or doesn't start with `|', then only the first
              file specified will be retrieved into _o_u_t_p_u_t; all other files
              will be retrieved into the basename of their remote name.

     --pp       Enable passive mode operation for use behind connection filter-
              ing firewalls.  This option has been deprecated as ffttpp now tries
              to use passive mode by default, falling back to active mode if
              the server does not support passive connections.
d79 1
a79 1
     --PP _p_o_r_t  Sets the port number to _p_o_r_t.
d81 5
a85 2
     --rr _w_a_i_t  Retry the connection attempt if it failed, pausing for _w_a_i_t sec-
              onds.
d87 1
a87 2
     --qq _q_u_i_t_t_i_m_e
              Quit if the connection has stalled for _q_u_i_t_t_i_m_e seconds.
d89 1
a89 1
     --RR       Restart all non-proxied auto-fetches.
d91 1
a91 1
     --tt       Enables packet tracing.
d94 3
a96 3
              Set the maximum transfer rate for _d_i_r_e_c_t_i_o_n to _m_a_x_i_m_u_m
              bytes/second, and if specified, the increment to _i_n_c_r_e_m_e_n_t
              bytes/second.  Refer to rraattee for more information.
d99 10
a108 9
              Upload files on the command line to _U_R_L where _U_R_L is one of the
              ftp URL types as supported by auto-fetch (with an optional tar-
              get filename for single file uploads), and _f_i_l_e is one or more
              local files to be uploaded.

     --vv       Enable vveerrbboossee and pprrooggrreessss.  This is the default if output is
              to a terminal (and in the case of pprrooggrreessss, ffttpp is the fore-
              ground process).  Forces ffttpp to show all responses from the
              remote server, as well as report on data transfer statistics.
d110 2
a111 2
     --VV       Disable vveerrbboossee and pprrooggrreessss, overriding the default of enabled
              when output is to a terminal.
d184 5
a188 5
     ddeebbuugg [_d_e_b_u_g_-_v_a_l_u_e]
                 Toggle debugging mode.  If an optional _d_e_b_u_g_-_v_a_l_u_e is speci-
                 fied it is used to set the debugging level.  When debugging
                 is on, ffttpp prints each command sent to the remote machine,
                 preceded by the string `-->'
d267 1
a267 1
                 Toggle hash-sign (``#'') printing for each data block trans-
d304 17
a320 12
                 characters in all defined macros.  Macros remain defined
                 until a cclloossee command is executed.  The macro processor
                 interprets `$' and `\' as special characters.  A `$' followed
                 by a number (or numbers) is replaced by the corresponding
                 argument on the macro invocation command line.  A `$' fol-
                 lowed by an `i' signals that macro processor that the execut-
                 ing macro is to be looped.  On the first pass `$i' is
                 replaced by the first argument on the macro invocation com-
                 mand line, on the second pass it is replaced by the second
                 argument, and so on.  A `\' followed by any character is
                 replaced by that character.  Use the `\' to prevent special
                 treatment of the `$'.
d368 1
a368 1
                 machine.
d408 3
a410 3
                 the sequences `$1', `$2', ..., `$9' in _i_n_p_a_t_t_e_r_n.  Use `\' to
                 prevent this special treatment of the `$' character.  All
                 other characters are treated literally, and are used to
d415 6
a420 6
                 name.  The sequences `$1', `$2', ...., `$9' are replaced by
                 any value resulting from the _i_n_p_a_t_t_e_r_n template.  The
                 sequence `$0' is replace by the original filename.  Addition-
                 ally, the sequence `[_s_e_q_1, _s_e_q_2]' is replaced by [_s_e_q_1] if
                 _s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2.
                 For example, the command
d428 4
a431 3
                 _o_u_t_p_a_t_t_e_r_n, as in the example: `nmap $1 sed "s/  *$//" > $1'
                 .  Use the `\' character to prevent special treatment of the
                 `$','[',']', and `,' characters.
d472 1
a472 1
                 required to support the PASV command by RFC 1123, some do
d783 2
a784 2
           In order to be compliant with RFC 1738, ffttpp interprets the _p_a_t_h
           part of an ``ftp://'' auto-fetch URL as follows:
d799 1
a799 1
           ++oo   Any `%_X_X' codes (per RFC 1738) within the path components are
d852 9
d920 1
a920 1
          names are expanded according to the rules used in the csh(1); c.f.
d995 7
a1001 2
               If a macro named iinniitt is defined, it is automatically executed
               as the last step in the auto-login process.  For example,
d1101 2
a1102 2
                    or password (for example `@@' or `/'), encode them with RFC
                    1738 `%_X_X' encoding.
d1131 20
a1150 2
     ffttpp attempts to be compliant with RFC 959, RFC 1123, RFC 1738, RFC 2068,
     RFC 2389, RFC 2428, RFC 2732, and ddrraafftt--iieettff--ffttppeexxtt--mmllsstt--1111.
d1183 1
a1183 1
NetBSD 3.0_BETA                January 15, 2005                NetBSD 3.0_BETA
@


1.2
log
@Merge changes between tnftp-20030825 & tnftp-20050103
@
text
@d773 1
a773 1
           In order to be compliant with RRFFCC 11773388, ffttpp interprets the _p_a_t_h
d789 6
a794 6
           ++oo   Any `%_X_X' codes within the path components are decoded, with _X_X
               representing a character code in hexadecimal.  This decoding
               takes place after the _p_a_t_h has been split into components, but
               before each component is used in the equivalent of a ccdd or ggeett
               command.  Some often-used codes are `%2F' (which represents
               `/') and `%7E' (which represents `~').
d1069 1
a1069 2
                    _N_O_T_E: this is not used for interactive sessions, only for
                    command-line fetches.
d1076 4
d1107 2
a1108 2
     ffttpp attempts to be compliant with RRFFCC 995599, RRFFCC 11112233, RRFFCC 11773388, RRFFCC 22006688,
     RRFFCC 22338899, RRFFCC 22442288, RRFFCC 22773322, and ddrraafftt--iieettff--ffttppeexxtt--mmllsstt--1111.
d1141 1
a1141 1
NetBSD 2.0                      October 7, 2004                     NetBSD 2.0
@


1.1
log
@put a copy of the extracted tnftp sources in files/, required for
bootstrap.

ok'd by lukem.
@
text
@d4 1
a4 1
     ffttpp - Internet file transfer program
d31 3
a33 3
              mode ftp and fall back to active mode if passive is not support-
              ed by the server.  This option causes ffttpp to always use an ac-
              tive connection.  It is only useful for connecting to very old
d52 9
a60 6
              nection.  If auto-login is enabled, ffttpp will check the _._n_e_t_r_c
              (see below) file in the user's home directory for an entry de-
              scribing an account on the remote machine.  If no entry exists,
              ffttpp will prompt for the remote machine login name (default is
              the user identity on the local machine), and, if necessary,
              prompt for a password and an account with which to login.
d103 2
a104 2
              ground process).  Forces ffttpp to show all responses from the re-
              mote server, as well as report on data transfer statistics.
d113 2
a114 2
     awaiting commands from the user the prompt `ftp>' is provided to the us-
     er.  The following commands are recognized by ffttpp:
d138 2
a139 2
     aasscciiii       Set the file transfer ttyyppee to network ASCII.  This is the de-
                 fault type.
d147 2
a148 2
                 ffttpp.  An end of file will also terminate the session and ex-
                 it.
d170 2
a171 2
     ccrr          Toggle carriage return stripping during ascii type file re-
                 trieval.  Records are denoted by a carriage return/linefeed
d194 2
a195 2
                 If _r_e_m_o_t_e_-_p_a_t_h is left unspecified, the current working di-
                 rectory is used.  If interactive prompting is on, ffttpp will
d237 2
a238 2
                 will be used as the port to connect to on the gate-ftp serv-
                 er.
d300 12
a311 11
                 characters in all defined macros.  Macros remain defined un-
                 til a cclloossee command is executed.  The macro processor inter-
                 prets `$' and `\' as special characters.  A `$' followed by a
                 number (or numbers) is replaced by the corresponding argument
                 on the macro invocation command line.  A `$' followed by an
                 `i' signals that macro processor that the executing macro is
                 to be looped.  On the first pass `$i' is replaced by the
                 first argument on the macro invocation command line, on the
                 second pass it is replaced by the second argument, and so on.
                 A `\' followed by any character is replaced by that charac-
                 ter.  Use the `\' to prevent special treatment of the `$'.
d358 2
a359 2
                 Show the last modification time of the file on the remote ma-
                 chine.
d389 2
a390 2
                 mmppuutt commands and ppuutt commands issued without a specified re-
                 mote target filename.  If arguments are specified, local
d401 2
a402 2
                 other characters are treated literally, and are used to de-
                 termine the nnmmaapp [_i_n_p_a_t_t_e_r_n] variable values.  For example,
d407 5
a411 5
                 any value resulting from the _i_n_p_a_t_t_e_r_n template.  The se-
                 quence `$0' is replace by the original filename.  Additional-
                 ly, the sequence `[_s_e_q_1, _s_e_q_2]' is replaced by [_s_e_q_1] if _s_e_q_1
                 is not a null string; otherwise it is replaced by _s_e_q_2.  For
                 example, the command
d417 2
a418 2
                 the input filename "myfile", and "myfile.myfile" for the in-
                 put filename ".myfile".  Spaces may be included in
d429 2
a430 2
                 get filename.  If arguments are specified, characters in lo-
                 cal filenames are translated during mmggeett commands and ggeett
d461 3
a463 2
                 tionality of traffic.  (Note that though FTP servers are re-
                 quired to support the PASV command by RFC 1123, some do not.)
d519 9
a527 9
                 aced by pprrooxxyy: ooppeenn will not define new macros during the au-
                 to-login process, cclloossee will not erase existing macro defini-
                 tions, ggeett and mmggeett transfer files from the host on the pri-
                 mary control connection to the host on the secondary control
                 connection, and ppuutt, mmppuutt, and aappppeenndd transfer files from the
                 host on the secondary control connection to the host on the
                 primary control connection.  Third party file transfers de-
                 pend upon support of the FTP protocol PASV command by the
                 server on the secondary control connection.
d554 2
a555 2
                 _m_a_x_i_m_u_m can by modified on the fly by _i_n_c_r_e_m_e_n_t bytes (de-
                 fault: 1024) each time a given signal is received:
d559 2
a560 2
                       SIGUSR2  Decrement _m_a_x_i_m_u_m by _i_n_c_r_e_m_e_n_t bytes.  The re-
                                sult must be a positive number.
d590 4
a593 4
     rreesseett       Clear reply queue.  This command re-synchronizes command/re-
                 ply sequencing with the remote FTP server.  Resynchronization
                 may be necessary following a violation of the FTP protocol by
                 the remote server.
d597 2
a598 2
                 _m_a_r_k_e_r.  On UNIX systems, marker is usually a byte offset in-
                 to the file.
d609 2
a610 2
                 _r_e_m_o_t_e_-_f_i_l_e is specified, show status of _r_e_m_o_t_e_-_f_i_l_e on re-
                 mote machine.
d620 2
a621 2
                 affect local files generated from a shell command (see be-
                 low).  The default value is off.
d626 2
a627 2
     sseennddppoorrtt    Toggle the use of PORT commands.  By default, ffttpp will at-
                 tempt to use a PORT command when establishing a connection
d676 2
a677 2
     ssyysstteemm      Show the type of operating system running on the remote ma-
                 chine.
d715 3
a717 3
                 bose is on, when a file transfer completes, statistics re-
                 garding the efficiency of the transfer are reported.  By de-
                 fault, verbose is on.
d732 2
a733 2
     xxffeerrbbuuff) support an optional suffix on the argument which changes the in-
     terpretation of the argument.  Supported suffixes are:
d764 4
a767 4
           defined.  Otherwise, transfer the URL using HTTP via the proxy de-
           fined in sseett ffttpp__pprrooxxyy.  If sseett ffttpp__pprrooxxyy isn't defined and _u_s_e_r is
           given, login as _u_s_e_r.  In this case, use _p_a_s_s_w_o_r_d if supplied, oth-
           erwise prompt the user for one.
d799 6
a804 6
               of the specified user or of the `anonymous' user.  If the _/ di-
               rectory is required, use a leading path of ``%2F''.  If a us-
               er's home directory is required (and the remote server supports
               the syntax), use a leading path of ``%7Euser/''.  For example,
               to retrieve _/_e_t_c_/_m_o_t_d from `localhost' as the user `myname'
               with the password `mypass', use
d828 2
a829 2
           ++oo   You must have appropriate access permission for each of the in-
               termediate directories that is used in the equivalent of a ccdd
d843 5
a847 1
     stored in the current directory as the basename(1) of _p_a_t_h.
d858 3
a860 3
     ies will be restarted.  For FTP, this is implemented by using rreeggeett in-
     stead of ggeett.  For HTTP, this is implemented by using the `Range: bytes='
     HTTP/1.1 directive.
d903 2
a904 2
          (e.g.  ppuutt), only the first filename generated by the "globbing" op-
          eration is used.
d907 2
a908 2
          names, the local filename is the remote filename, which may be al-
          tered by a ccaassee, nnttrraannss, or nnmmaapp setting.  The resulting filename
d912 3
a914 3
          names, the remote filename is the local filename, which may be al-
          tered by a nnttrraannss or nnmmaapp setting.  The resulting filename may then
          be altered by the remote server if ssuunniiqquuee is on.
d923 2
a924 2
     ffttpp supports only the default values for the remaining file transfer pa-
     rameters: mmooddee, ffoorrmm, and ssttrruucctt.
d930 2
a931 2
     ment variable.  The following tokens are recognized; they may be separat-
     ed by spaces, tabs, or new-lines:
d934 6
a939 6
               Identify a remote machine _n_a_m_e.  The auto-login process search-
               es the _._n_e_t_r_c file for a mmaacchhiinnee token that matches the remote
               machine specified on the ffttpp command line or as an ooppeenn command
               argument.  Once a match is made, the subsequent _._n_e_t_r_c tokens
               are processed, stopping when the end of file is reached or an-
               other mmaacchhiinnee or a ddeeffaauulltt token is encountered.
d947 3
a949 3
               thereby giving the user an automatic anonymous FTP login to ma-
               chines not specified in _._n_e_t_r_c.  This can be overridden by us-
               ing the --nn flag to disable auto-login.
d986 5
a990 4
     ffttpp supports interactive command line editing, via the editline(3) li-
     brary.  It is enabled with the eeddiitt command, and is enabled by default if
     input is from a tty.  Previous lines can be recalled and edited with the
     arrow keys, and other GNU Emacs-style editing keys may be used as well.
d997 2
a998 2
     use this, bind a key to the editline(3) command ffttpp--ccoommpplleettee.  By de-
     fault, this is bound to the TAB key.
d1012 3
a1014 3
                The trailing component of the current remote working directo-
                ry, or _n trailing components if a digit _n is given.  If _n be-
                gins with `0', the number of skipped components precede the
d1097 2
a1098 2
     the above section _T_h_e _._n_e_t_r_c _F_i_l_e for an example of how to make this au-
     tomatic.
d1138 1
a1138 1
NetBSD 1.6                       July 31, 2003                      NetBSD 1.6
@


1.1.8.1
log
@Pullup ticket 213 - requested by Adrian Portelli
security fix for tnftp

        Module Name:	pkgsrc
        Committed By:	lukem
        Date:		Tue Jan  4 23:18:56 UTC 2005

        Update of /cvsroot/pkgsrc/net/tnftp/files
        In directory ivanova.netbsd.org:/tmp/cvs-serv1263

        Log Message:
        Import tnftp 20050103.
        Various changes, including:
        	* forbid mget of filenames that aren't in or below
                  the local cwd.
        	* improve auto-fetch transfers
        	* improve www/proxy authentication support
        	* improve http response header parsing
        	* change UCB-licensed code from 4-clause to 3-clause
@
text
@d4 1
a4 1
     ffttpp -- Internet file transfer program
d31 3
a33 3
              mode ftp and fall back to active mode if passive is not sup-
              ported by the server.  This option causes ffttpp to always use an
              active connection.  It is only useful for connecting to very old
d52 6
a57 9
              nection for non auto-fetch transfers.  If auto-login is enabled,
              ffttpp will check the _._n_e_t_r_c (see below) file in the user's home
              directory for an entry describing an account on the remote
              machine.  If no entry exists, ffttpp will prompt for the remote
              machine login name (default is the user identity on the local
              machine), and, if necessary, prompt for a password and an
              account with which to login.  To override the auto-login for
              auto-fetch transfers, specify the username (and optionally,
              password) as appropriate.
d100 2
a101 2
              ground process).  Forces ffttpp to show all responses from the
              remote server, as well as report on data transfer statistics.
d110 2
a111 2
     awaiting commands from the user the prompt `ftp>' is provided to the
     user.  The following commands are recognized by ffttpp:
d135 2
a136 2
     aasscciiii       Set the file transfer ttyyppee to network ASCII.  This is the
                 default type.
d144 2
a145 2
                 ffttpp.  An end of file will also terminate the session and
                 exit.
d167 2
a168 2
     ccrr          Toggle carriage return stripping during ascii type file
                 retrieval.  Records are denoted by a carriage return/linefeed
d191 2
a192 2
                 If _r_e_m_o_t_e_-_p_a_t_h is left unspecified, the current working
                 directory is used.  If interactive prompting is on, ffttpp will
d234 2
a235 2
                 will be used as the port to connect to on the gate-ftp
                 server.
d297 11
a307 12
                 characters in all defined macros.  Macros remain defined
                 until a cclloossee command is executed.  The macro processor
                 interprets `$' and `\' as special characters.  A `$' followed
                 by a number (or numbers) is replaced by the corresponding
                 argument on the macro invocation command line.  A `$' fol-
                 lowed by an `i' signals that macro processor that the execut-
                 ing macro is to be looped.  On the first pass `$i' is
                 replaced by the first argument on the macro invocation com-
                 mand line, on the second pass it is replaced by the second
                 argument, and so on.  A `\' followed by any character is
                 replaced by that character.  Use the `\' to prevent special
                 treatment of the `$'.
d354 2
a355 2
                 Show the last modification time of the file on the remote
                 machine.
d385 2
a386 2
                 mmppuutt commands and ppuutt commands issued without a specified
                 remote target filename.  If arguments are specified, local
d397 2
a398 2
                 other characters are treated literally, and are used to
                 determine the nnmmaapp [_i_n_p_a_t_t_e_r_n] variable values.  For example,
d403 5
a407 5
                 any value resulting from the _i_n_p_a_t_t_e_r_n template.  The
                 sequence `$0' is replace by the original filename.  Addition-
                 ally, the sequence `[_s_e_q_1, _s_e_q_2]' is replaced by [_s_e_q_1] if
                 _s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2.
                 For example, the command
d413 2
a414 2
                 the input filename "myfile", and "myfile.myfile" for the
                 input filename ".myfile".  Spaces may be included in
d425 2
a426 2
                 get filename.  If arguments are specified, characters in
                 local filenames are translated during mmggeett commands and ggeett
d457 2
a458 3
                 tionality of traffic.  (Note that though FTP servers are
                 required to support the PASV command by RFC 1123, some do
                 not.)
d514 9
a522 9
                 aced by pprrooxxyy: ooppeenn will not define new macros during the
                 auto-login process, cclloossee will not erase existing macro defi-
                 nitions, ggeett and mmggeett transfer files from the host on the
                 primary control connection to the host on the secondary con-
                 trol connection, and ppuutt, mmppuutt, and aappppeenndd transfer files
                 from the host on the secondary control connection to the host
                 on the primary control connection.  Third party file trans-
                 fers depend upon support of the FTP protocol PASV command by
                 the server on the secondary control connection.
d549 2
a550 2
                 _m_a_x_i_m_u_m can be modified on the fly by _i_n_c_r_e_m_e_n_t bytes
                 (default: 1024) each time a given signal is received:
d554 2
a555 2
                       SIGUSR2  Decrement _m_a_x_i_m_u_m by _i_n_c_r_e_m_e_n_t bytes.  The
                                result must be a positive number.
d585 4
a588 4
     rreesseett       Clear reply queue.  This command re-synchronizes com-
                 mand/reply sequencing with the remote FTP server.  Resynchro-
                 nization may be necessary following a violation of the FTP
                 protocol by the remote server.
d592 2
a593 2
                 _m_a_r_k_e_r.  On UNIX systems, marker is usually a byte offset
                 into the file.
d604 2
a605 2
                 _r_e_m_o_t_e_-_f_i_l_e is specified, show status of _r_e_m_o_t_e_-_f_i_l_e on
                 remote machine.
d615 2
a616 2
                 affect local files generated from a shell command (see
                 below).  The default value is off.
d621 2
a622 2
     sseennddppoorrtt    Toggle the use of PORT commands.  By default, ffttpp will
                 attempt to use a PORT command when establishing a connection
d671 2
a672 2
     ssyysstteemm      Show the type of operating system running on the remote
                 machine.
d710 3
a712 3
                 bose is on, when a file transfer completes, statistics
                 regarding the efficiency of the transfer are reported.  By
                 default, verbose is on.
d727 2
a728 2
     xxffeerrbbuuff) support an optional suffix on the argument which changes the
     interpretation of the argument.  Supported suffixes are:
d759 4
a762 4
           defined.  Otherwise, transfer the URL using HTTP via the proxy
           defined in sseett ffttpp__pprrooxxyy.  If sseett ffttpp__pprrooxxyy isn't defined and _u_s_e_r
           is given, login as _u_s_e_r.  In this case, use _p_a_s_s_w_o_r_d if supplied,
           otherwise prompt the user for one.
d794 6
a799 6
               of the specified user or of the `anonymous' user.  If the _/
               directory is required, use a leading path of ``%2F''.  If a
               user's home directory is required (and the remote server sup-
               ports the syntax), use a leading path of ``%7Euser/''.  For
               example, to retrieve _/_e_t_c_/_m_o_t_d from `localhost' as the user
               `myname' with the password `mypass', use
d823 2
a824 2
           ++oo   You must have appropriate access permission for each of the
               intermediate directories that is used in the equivalent of a ccdd
d838 1
a838 5
     stored in the current directory as the basename(1) of _p_a_t_h.  Note that if
     a HTTP redirect is received, the fetch is retried using the new target
     URL supplied by the server, with a corresponding new _p_a_t_h.  Using an
     explicit --oo _o_u_t_p_u_t is recommended, to avoid writing to unexpected file
     names.
d849 3
a851 3
     ies will be restarted.  For FTP, this is implemented by using rreeggeett
     instead of ggeett.  For HTTP, this is implemented by using the `Range:
     bytes=' HTTP/1.1 directive.
d894 2
a895 2
          (e.g.  ppuutt), only the first filename generated by the "globbing"
          operation is used.
d898 2
a899 2
          names, the local filename is the remote filename, which may be
          altered by a ccaassee, nnttrraannss, or nnmmaapp setting.  The resulting filename
d903 3
a905 3
          names, the remote filename is the local filename, which may be
          altered by a nnttrraannss or nnmmaapp setting.  The resulting filename may
          then be altered by the remote server if ssuunniiqquuee is on.
d914 2
a915 2
     ffttpp supports only the default values for the remaining file transfer
     parameters: mmooddee, ffoorrmm, and ssttrruucctt.
d921 2
a922 2
     ment variable.  The following tokens are recognized; they may be sepa-
     rated by spaces, tabs, or new-lines:
d925 6
a930 6
               Identify a remote machine _n_a_m_e.  The auto-login process
               searches the _._n_e_t_r_c file for a mmaacchhiinnee token that matches the
               remote machine specified on the ffttpp command line or as an ooppeenn
               command argument.  Once a match is made, the subsequent _._n_e_t_r_c
               tokens are processed, stopping when the end of file is reached
               or another mmaacchhiinnee or a ddeeffaauulltt token is encountered.
d938 3
a940 3
               thereby giving the user an automatic anonymous FTP login to
               machines not specified in _._n_e_t_r_c.  This can be overridden by
               using the --nn flag to disable auto-login.
d977 4
a980 5
     ffttpp supports interactive command line editing, via the editline(3)
     library.  It is enabled with the eeddiitt command, and is enabled by default
     if input is from a tty.  Previous lines can be recalled and edited with
     the arrow keys, and other GNU Emacs-style editing keys may be used as
     well.
d987 2
a988 2
     use this, bind a key to the editline(3) command ffttpp--ccoommpplleettee.  By
     default, this is bound to the TAB key.
d1002 3
a1004 3
                The trailing component of the current remote working direc-
                tory, or _n trailing components if a digit _n is given.  If _n
                begins with `0', the number of skipped components precede the
d1087 2
a1088 2
     the above section _T_h_e _._n_e_t_r_c _F_i_l_e for an example of how to make this
     automatic.
d1128 1
a1128 1
NetBSD 2.0                      October 7, 2004                     NetBSD 2.0
@


1.1.1.1
log
@Import of canonical tnftp 20030825 sources,
to make it easier to track new versions.
@
text
@@


1.1.1.2
log
@Import tnftp 20050103.
Various changes, including:
	* forbid mget of filenames that aren't in or below the local cwd.
	* improve auto-fetch transfers
	* improve www/proxy authentication support
	* improve http response header parsing
	* change UCB-licensed code from 4-clause to 3-clause
@
text
@d4 1
a4 1
     ffttpp -- Internet file transfer program
d31 3
a33 3
              mode ftp and fall back to active mode if passive is not sup-
              ported by the server.  This option causes ffttpp to always use an
              active connection.  It is only useful for connecting to very old
d52 6
a57 9
              nection for non auto-fetch transfers.  If auto-login is enabled,
              ffttpp will check the _._n_e_t_r_c (see below) file in the user's home
              directory for an entry describing an account on the remote
              machine.  If no entry exists, ffttpp will prompt for the remote
              machine login name (default is the user identity on the local
              machine), and, if necessary, prompt for a password and an
              account with which to login.  To override the auto-login for
              auto-fetch transfers, specify the username (and optionally,
              password) as appropriate.
d100 2
a101 2
              ground process).  Forces ffttpp to show all responses from the
              remote server, as well as report on data transfer statistics.
d110 2
a111 2
     awaiting commands from the user the prompt `ftp>' is provided to the
     user.  The following commands are recognized by ffttpp:
d135 2
a136 2
     aasscciiii       Set the file transfer ttyyppee to network ASCII.  This is the
                 default type.
d144 2
a145 2
                 ffttpp.  An end of file will also terminate the session and
                 exit.
d167 2
a168 2
     ccrr          Toggle carriage return stripping during ascii type file
                 retrieval.  Records are denoted by a carriage return/linefeed
d191 2
a192 2
                 If _r_e_m_o_t_e_-_p_a_t_h is left unspecified, the current working
                 directory is used.  If interactive prompting is on, ffttpp will
d234 2
a235 2
                 will be used as the port to connect to on the gate-ftp
                 server.
d297 11
a307 12
                 characters in all defined macros.  Macros remain defined
                 until a cclloossee command is executed.  The macro processor
                 interprets `$' and `\' as special characters.  A `$' followed
                 by a number (or numbers) is replaced by the corresponding
                 argument on the macro invocation command line.  A `$' fol-
                 lowed by an `i' signals that macro processor that the execut-
                 ing macro is to be looped.  On the first pass `$i' is
                 replaced by the first argument on the macro invocation com-
                 mand line, on the second pass it is replaced by the second
                 argument, and so on.  A `\' followed by any character is
                 replaced by that character.  Use the `\' to prevent special
                 treatment of the `$'.
d354 2
a355 2
                 Show the last modification time of the file on the remote
                 machine.
d385 2
a386 2
                 mmppuutt commands and ppuutt commands issued without a specified
                 remote target filename.  If arguments are specified, local
d397 2
a398 2
                 other characters are treated literally, and are used to
                 determine the nnmmaapp [_i_n_p_a_t_t_e_r_n] variable values.  For example,
d403 5
a407 5
                 any value resulting from the _i_n_p_a_t_t_e_r_n template.  The
                 sequence `$0' is replace by the original filename.  Addition-
                 ally, the sequence `[_s_e_q_1, _s_e_q_2]' is replaced by [_s_e_q_1] if
                 _s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2.
                 For example, the command
d413 2
a414 2
                 the input filename "myfile", and "myfile.myfile" for the
                 input filename ".myfile".  Spaces may be included in
d425 2
a426 2
                 get filename.  If arguments are specified, characters in
                 local filenames are translated during mmggeett commands and ggeett
d457 2
a458 3
                 tionality of traffic.  (Note that though FTP servers are
                 required to support the PASV command by RFC 1123, some do
                 not.)
d514 9
a522 9
                 aced by pprrooxxyy: ooppeenn will not define new macros during the
                 auto-login process, cclloossee will not erase existing macro defi-
                 nitions, ggeett and mmggeett transfer files from the host on the
                 primary control connection to the host on the secondary con-
                 trol connection, and ppuutt, mmppuutt, and aappppeenndd transfer files
                 from the host on the secondary control connection to the host
                 on the primary control connection.  Third party file trans-
                 fers depend upon support of the FTP protocol PASV command by
                 the server on the secondary control connection.
d549 2
a550 2
                 _m_a_x_i_m_u_m can be modified on the fly by _i_n_c_r_e_m_e_n_t bytes
                 (default: 1024) each time a given signal is received:
d554 2
a555 2
                       SIGUSR2  Decrement _m_a_x_i_m_u_m by _i_n_c_r_e_m_e_n_t bytes.  The
                                result must be a positive number.
d585 4
a588 4
     rreesseett       Clear reply queue.  This command re-synchronizes com-
                 mand/reply sequencing with the remote FTP server.  Resynchro-
                 nization may be necessary following a violation of the FTP
                 protocol by the remote server.
d592 2
a593 2
                 _m_a_r_k_e_r.  On UNIX systems, marker is usually a byte offset
                 into the file.
d604 2
a605 2
                 _r_e_m_o_t_e_-_f_i_l_e is specified, show status of _r_e_m_o_t_e_-_f_i_l_e on
                 remote machine.
d615 2
a616 2
                 affect local files generated from a shell command (see
                 below).  The default value is off.
d621 2
a622 2
     sseennddppoorrtt    Toggle the use of PORT commands.  By default, ffttpp will
                 attempt to use a PORT command when establishing a connection
d671 2
a672 2
     ssyysstteemm      Show the type of operating system running on the remote
                 machine.
d710 3
a712 3
                 bose is on, when a file transfer completes, statistics
                 regarding the efficiency of the transfer are reported.  By
                 default, verbose is on.
d727 2
a728 2
     xxffeerrbbuuff) support an optional suffix on the argument which changes the
     interpretation of the argument.  Supported suffixes are:
d759 4
a762 4
           defined.  Otherwise, transfer the URL using HTTP via the proxy
           defined in sseett ffttpp__pprrooxxyy.  If sseett ffttpp__pprrooxxyy isn't defined and _u_s_e_r
           is given, login as _u_s_e_r.  In this case, use _p_a_s_s_w_o_r_d if supplied,
           otherwise prompt the user for one.
d794 6
a799 6
               of the specified user or of the `anonymous' user.  If the _/
               directory is required, use a leading path of ``%2F''.  If a
               user's home directory is required (and the remote server sup-
               ports the syntax), use a leading path of ``%7Euser/''.  For
               example, to retrieve _/_e_t_c_/_m_o_t_d from `localhost' as the user
               `myname' with the password `mypass', use
d823 2
a824 2
           ++oo   You must have appropriate access permission for each of the
               intermediate directories that is used in the equivalent of a ccdd
d838 1
a838 5
     stored in the current directory as the basename(1) of _p_a_t_h.  Note that if
     a HTTP redirect is received, the fetch is retried using the new target
     URL supplied by the server, with a corresponding new _p_a_t_h.  Using an
     explicit --oo _o_u_t_p_u_t is recommended, to avoid writing to unexpected file
     names.
d849 3
a851 3
     ies will be restarted.  For FTP, this is implemented by using rreeggeett
     instead of ggeett.  For HTTP, this is implemented by using the `Range:
     bytes=' HTTP/1.1 directive.
d894 2
a895 2
          (e.g.  ppuutt), only the first filename generated by the "globbing"
          operation is used.
d898 2
a899 2
          names, the local filename is the remote filename, which may be
          altered by a ccaassee, nnttrraannss, or nnmmaapp setting.  The resulting filename
d903 3
a905 3
          names, the remote filename is the local filename, which may be
          altered by a nnttrraannss or nnmmaapp setting.  The resulting filename may
          then be altered by the remote server if ssuunniiqquuee is on.
d914 2
a915 2
     ffttpp supports only the default values for the remaining file transfer
     parameters: mmooddee, ffoorrmm, and ssttrruucctt.
d921 2
a922 2
     ment variable.  The following tokens are recognized; they may be sepa-
     rated by spaces, tabs, or new-lines:
d925 6
a930 6
               Identify a remote machine _n_a_m_e.  The auto-login process
               searches the _._n_e_t_r_c file for a mmaacchhiinnee token that matches the
               remote machine specified on the ffttpp command line or as an ooppeenn
               command argument.  Once a match is made, the subsequent _._n_e_t_r_c
               tokens are processed, stopping when the end of file is reached
               or another mmaacchhiinnee or a ddeeffaauulltt token is encountered.
d938 3
a940 3
               thereby giving the user an automatic anonymous FTP login to
               machines not specified in _._n_e_t_r_c.  This can be overridden by
               using the --nn flag to disable auto-login.
d977 4
a980 5
     ffttpp supports interactive command line editing, via the editline(3)
     library.  It is enabled with the eeddiitt command, and is enabled by default
     if input is from a tty.  Previous lines can be recalled and edited with
     the arrow keys, and other GNU Emacs-style editing keys may be used as
     well.
d987 2
a988 2
     use this, bind a key to the editline(3) command ffttpp--ccoommpplleettee.  By
     default, this is bound to the TAB key.
d1002 3
a1004 3
                The trailing component of the current remote working direc-
                tory, or _n trailing components if a digit _n is given.  If _n
                begins with `0', the number of skipped components precede the
d1087 2
a1088 2
     the above section _T_h_e _._n_e_t_r_c _F_i_l_e for an example of how to make this
     automatic.
d1128 1
a1128 1
NetBSD 2.0                      October 7, 2004                     NetBSD 2.0
@


1.1.1.3
log
@tnftp 20050511.
Notable changes:
* Improve timeout handling during connection initiation
* Prevent coredump with long command lines when editing is enabled.
@
text
@d773 1
a773 1
           In order to be compliant with RFC 1738, ffttpp interprets the _p_a_t_h
d789 6
a794 6
           ++oo   Any `%_X_X' codes (per RFC 1738) within the path components are
               decoded, with _X_X representing a character code in hexadecimal.
               This decoding takes place after the _p_a_t_h has been split into
               components, but before each component is used in the equivalent
               of a ccdd or ggeett command.  Some often-used codes are `%2F' (which
               represents `/') and `%7E' (which represents `~').
d1069 2
a1070 1
                    See http_proxy for further notes about proxy use.
a1076 4
                    If ``unsafe'' URL characters are required in the username
                    or password (for example `@@' or `/'), encode them with RFC
                    1738 `%_X_X' encoding.

d1104 2
a1105 2
     ffttpp attempts to be compliant with RFC 959, RFC 1123, RFC 1738, RFC 2068,
     RFC 2389, RFC 2428, RFC 2732, and ddrraafftt--iieettff--ffttppeexxtt--mmllsstt--1111.
d1138 1
a1138 1
NetBSD 3.0_BETA                January 15, 2005                NetBSD 3.0_BETA
@


1.1.1.4
log
@Update to tnftp 20070806.
Notable changes:
 - Implement '-s srcaddr' to set the local IP address for all connections.
 - Support '-q quittime' when waiting for server replies.
 - Use IEC 60027-2 "KiB", "MiB" (etc) instead of "KB", "MB", ...
 - Portability fixes, including for FreeBSD, Mac OS X, and Solaris.
@
text
@d8 1
a8 1
         [--ss _s_r_c_a_d_d_r] [--rr _r_e_t_r_y] [--TT _d_i_r,_m_a_x[,_i_n_c]] [[_u_s_e_r@@]_h_o_s_t [_p_o_r_t]]
d26 1
a26 1
     --44          Forces ffttpp to only use IPv4 addresses.
d28 1
a28 1
     --66          Forces ffttpp to only use IPv6 addresses.
d30 47
a76 48
     --AA          Force active mode ftp.  By default, ffttpp will try to use pas-
                 sive mode ftp and fall back to active mode if passive is not
                 supported by the server.  This option causes ffttpp to always
                 use an active connection.  It is only useful for connecting
                 to very old servers that do not implement passive mode prop-
                 erly.

     --aa          Causes ffttpp to bypass normal login procedure, and use an
                 anonymous login instead.

     --dd          Enables debugging.

     --ee          Disables command line editing.  This is useful for Emacs
                 ange-ftp mode.

     --ff          Forces a cache reload for transfers that go through the FTP
                 or HTTP proxies.

     --gg          Disables file name globbing.

     --ii          Turns off interactive prompting during multiple file trans-
                 fers.

     --nn          Restrains ffttpp from attempting ``auto-login'' upon initial
                 connection for non auto-fetch transfers.  If auto-login is
                 enabled, ffttpp will check the _._n_e_t_r_c (see below) file in the
                 user's home directory for an entry describing an account on
                 the remote machine.  If no entry exists, ffttpp will prompt for
                 the remote machine login name (default is the user identity
                 on the local machine), and, if necessary, prompt for a pass-
                 word and an account with which to login.  To override the
                 auto-login for auto-fetch transfers, specify the username
                 (and optionally, password) as appropriate.

     --NN _n_e_t_r_c    Use _n_e_t_r_c instead of _~_/_._n_e_t_r_c.  Refer to _T_H_E _._n_e_t_r_c _F_I_L_E for
                 more information.

     --oo _o_u_t_p_u_t   When auto-fetching files, save the contents in _o_u_t_p_u_t.
                 _o_u_t_p_u_t is parsed according to the _F_I_L_E _N_A_M_I_N_G _C_O_N_V_E_N_T_I_O_N_S
                 below.  If _o_u_t_p_u_t is not `-' or doesn't start with `|', then
                 only the first file specified will be retrieved into _o_u_t_p_u_t;
                 all other files will be retrieved into the basename of their
                 remote name.

     --pp          Enable passive mode operation for use behind connection fil-
                 tering firewalls.  This option has been deprecated as ffttpp now
                 tries to use passive mode by default, falling back to active
                 mode if the server does not support passive connections.
d78 4
a81 1
     --PP _p_o_r_t     Sets the port number to _p_o_r_t.
d84 1
a84 4
                 Quit if the connection has stalled for _q_u_i_t_t_i_m_e seconds.

     --rr _w_a_i_t     Retry the connection attempt if it failed, pausing for _w_a_i_t
                 seconds.
d86 1
a86 1
     --RR          Restart all non-proxied auto-fetches.
d88 1
a88 3
     --ss _s_r_c_a_d_d_r  Uses _s_r_c_a_d_d_r as the local IP address for all connections.

     --tt          Enables packet tracing.
d91 3
a93 3
                 Set the maximum transfer rate for _d_i_r_e_c_t_i_o_n to _m_a_x_i_m_u_m
                 bytes/second, and if specified, the increment to _i_n_c_r_e_m_e_n_t
                 bytes/second.  Refer to rraattee for more information.
d96 9
a104 10
                 Upload files on the command line to _U_R_L where _U_R_L is one of
                 the ftp URL types as supported by auto-fetch (with an
                 optional target filename for single file uploads), and _f_i_l_e
                 is one or more local files to be uploaded.

     --vv          Enable vveerrbboossee and pprrooggrreessss.  This is the default if output
                 is to a terminal (and in the case of pprrooggrreessss, ffttpp is the
                 foreground process).  Forces ffttpp to show all responses from
                 the remote server, as well as report on data transfer statis-
                 tics.
d106 2
a107 2
     --VV          Disable vveerrbboossee and pprrooggrreessss, overriding the default of
                 enabled when output is to a terminal.
d180 5
a184 5
     ffttpp__ddeebbuugg [_f_t_p___d_e_b_u_g_-_v_a_l_u_e]
                 Toggle debugging mode.  If an optional _f_t_p___d_e_b_u_g_-_v_a_l_u_e is
                 specified it is used to set the debugging level.  When debug-
                 ging is on, ffttpp prints each command sent to the remote
                 machine, preceded by the string `-->'
d263 1
a263 1
                 Toggle hash-sign (`#') printing for each data block trans-
d300 12
a311 17
                 characters in all defined macros.  Macro names can be a maxi-
                 mum of 8 characters.  Macros are only applicable to the cur-
                 rent session they are defined within (or if defined outside a
                 session, to the session invoked with the next ooppeenn command),
                 and remain defined until a cclloossee command is executed.  To
                 invoke a macro, use the $$ command (see above).

                 The macro processor interprets `$' and `\' as special charac-
                 ters.  A `$' followed by a number (or numbers) is replaced by
                 the corresponding argument on the macro invocation command
                 line.  A `$' followed by an `i' signals the macro processor
                 that the executing macro is to be looped.  On the first pass
                 ``$i'' is replaced by the first argument on the macro invoca-
                 tion command line, on the second pass it is replaced by the
                 second argument, and so on.  A `\' followed by any character
                 is replaced by that character.  Use the `\' to prevent spe-
                 cial treatment of the `$'.
d359 1
a359 1
                 machine, in RFC2822 format.
d399 3
a401 3
                 the sequences ``$1'', ``$2'', ...  ``$9'' in _i_n_p_a_t_t_e_r_n.  Use
                 `\' to prevent this special treatment of the `$' character.
                 All other characters are treated literally, and are used to
d406 6
a411 6
                 name.  The sequences ``$1'', ``$2'', ...  ``$9'' are replaced
                 by any value resulting from the _i_n_p_a_t_t_e_r_n template.  The
                 sequence ``$0'' is replaced by the original filename.  Addi-
                 tionally, the sequence ``[_s_e_q_1, _s_e_q_2]'' is replaced by [_s_e_q_1]
                 if _s_e_q_1 is not a null string; otherwise it is replaced by
                 _s_e_q_2.  For example, the command
d419 3
a421 4
                 _o_u_t_p_a_t_t_e_r_n, as in the example:
                       nmap $1 sed s/  *$// > $1
                 Use the `\' character to prevent special treatment of the
                 `$', `[', `]', and `,' characters.
d462 1
a462 1
                 required to support the PASV command by RFC1123, some do
d773 2
a774 2
           In order to be compliant with RFC3986, ffttpp interprets the _p_a_t_h part
           of an ``ftp://'' auto-fetch URL as follows:
d789 1
a789 1
           ++oo   Any `%_X_X' codes (per RFC3986) within the path components are
a841 9
     about:_t_o_p_i_c
           Display information regarding _t_o_p_i_c; no file is retrieved for this
           auto-fetched element.  Supported values include:

           about:ftp      Information about ffttpp.

           about:version  The version of ffttpp.  Useful to provide when report-
                          ing problems.

d901 1
a901 1
          names are expanded according to the rules used in the csh(1); see
d976 2
a977 7
               Like the other tokens in the _._n_e_t_r_c file, a mmaaccddeeff is applica-
               ble only to the mmaacchhiinnee definition preceding it.  A mmaaccddeeff
               entry cannot be utilized by multiple mmaacchhiinnee definitions;
               rather, it must be defined following each mmaacchhiinnee it is
               intended to be used with.  If a macro named iinniitt is defined, it
               is automatically executed as the last step in the auto-login
               process.  For example,
d1077 2
a1078 2
                    or password (for example `@@' or `/'), encode them with
                    RFC3986 `%_X_X' encoding.
d1107 2
a1108 20
     ffttpp attempts to be compliant with:

           RFC0959   _F_i_l_e _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l

           RFC1123   _R_e_q_u_i_r_e_m_e_n_t_s _f_o_r _I_n_t_e_r_n_e_t _H_o_s_t_s _- _A_p_p_l_i_c_a_t_i_o_n _a_n_d _S_u_p_p_o_r_t

           RFC1635   _H_o_w _t_o _U_s_e _A_n_o_n_y_m_o_u_s _F_T_P

           RFC2389   _F_e_a_t_u_r_e _n_e_g_o_t_i_a_t_i_o_n _m_e_c_h_a_n_i_s_m _f_o_r _t_h_e _F_i_l_e _T_r_a_n_s_f_e_r
                     _P_r_o_t_o_c_o_l

           RFC2428   _F_T_P _E_x_t_e_n_s_i_o_n_s _f_o_r _I_P_v_6 _a_n_d _N_A_T_s

           RFC2616   _H_y_p_e_r_t_e_x_t _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l _-_- _H_T_T_P_/_1_._1

           RFC2822   _I_n_t_e_r_n_e_t _M_e_s_s_a_g_e _F_o_r_m_a_t

           RFC3659   _E_x_t_e_n_s_i_o_n_s _t_o _F_T_P

           RFC3986   _U_n_i_f_o_r_m _R_e_s_o_u_r_c_e _I_d_e_n_t_i_f_i_e_r _(_U_R_I_)
d1141 1
a1141 1
NetBSD 3.1.1                     July 18, 2007                    NetBSD 3.1.1
@


