2 .\" $NetBSD: ftp.1,v 1.21 1997/06/10 21:59:58 lukem Exp $
4 .\" Copyright (c) 1985, 1989, 1990, 1993
5 .\" The Regents of the University of California. All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. All advertising materials mentioning features or use of this software
16 .\" must display the following acknowledgement:
17 .\" This product includes software developed by the University of
18 .\" California, Berkeley and its contributors.
19 .\" 4. Neither the name of the University nor the names of its contributors
20 .\" may be used to endorse or promote products derived from this software
21 .\" without specific prior written permission.
23 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94
41 .Nm ftp , pftp , gate-ftp
50 .Op Ar host Op Ar port
52 ftp://[\fIuser\fR:\fIpassword\fR@]\fIhost\fR[:\fIport\fR]/\fIfile\fR[/]
54 http://\fIhost\fR[:\fIport\fR]/\fIfile\fR
56 \fIhost\fR:[/\fIpath\fR/]\fIfile\fR[/]
59 is the user interface to the
61 standard File Transfer Protocol.
62 The program allows a user to transfer files to and from a
65 The latter three usage formats will fetch a file using either the
66 HTTP or FTP protocols into the current directory.
67 This is ideal for scripts.
69 .Sx AUTO-FETCHING FILES
70 below for more information.
72 Options may be specified at the command line, or to the
78 to bypass normal login procedure, and use an anonymous login instead.
82 Disables command line editing.
84 Disables file name globbing.
86 Turns off interactive prompting during
87 multiple file transfers.
93 upon initial connection.
94 If auto-login is enabled,
98 (see below) file in the user's home directory for an entry describing
99 an account on the remote machine.
102 will prompt for the remote machine login name (default is the user
103 identity on the local machine), and, if necessary, prompt for a password
104 and an account with which to login.
106 Enables passive mode operation for use behind connection filtering firewalls.
109 command has the same effect.
111 Sets the port number to
114 Sets the local IP address for all connections to
116 which can be an IP address or a host name.
118 Enables packet tracing.
120 Disable data port range restrictions.
123 This is the default if input is from a terminal.
126 to show all responses from the remote server, as well
127 as report on data transfer statistics.
129 Disable verbose mode, overriding the default of enabled when input
133 The client host with which
135 is to communicate may be specified on the command line.
138 will immediately attempt to establish a connection to an
140 server on that host; otherwise,
142 will enter its command interpreter and await instructions
146 is awaiting commands from the user the prompt
148 is provided to the user.
149 The following commands are recognized
153 .It Ic \&! Op Ar command Op Ar args
154 Invoke an interactive shell on the local machine.
155 If there are arguments, the first is taken to be a command to execute
156 directly, with the rest of the arguments as its arguments.
157 .It Ic \&$ Ar macro-name Op Ar args
160 that was defined with the
163 Arguments are passed to the macro unglobbed.
164 .It Ic account Op Ar passwd
165 Supply a supplemental password required by a remote system for access
166 to resources once a login has been successfully completed.
167 If no argument is included, the user will be prompted for an account
168 password in a non-echoing input mode.
169 .It Ic append Ar local-file Op Ar remote-file
170 Append a local file to a file on the remote machine.
173 is left unspecified, the local file name is used in naming the
174 remote file after being altered by any
179 File transfer uses the current settings for
186 Set the file transfer
190 This is the default type.
192 Arrange that a bell be sounded after each file transfer
193 command is completed.
195 Set the file transfer
197 to support binary image transfer.
201 session with the remote server
204 An end of file will also terminate the session and exit.
206 Toggle remote computer file name case mapping during
211 is on (default is off), remote computer file names with all letters in
212 upper case are written in the local directory with the letters mapped
214 .It Ic \&cd Ar remote-directory
215 Change the working directory on the remote machine
217 .Ar remote-directory .
219 Change the remote machine working directory to the parent of the
220 current remote machine working directory.
221 .It Ic chmod Ar mode file-name
222 Change the permission modes of the file
230 session with the remote server, and
231 return to the command interpreter.
232 Any defined macros are erased.
234 Toggle carriage return stripping during
235 ascii type file retrieval.
236 Records are denoted by a carriage return/linefeed sequence
237 during ascii type file transfer.
240 is on (the default), carriage returns are stripped from this
241 sequence to conform with the
243 single linefeed record
247 remote systems may contain single linefeeds;
248 when an ascii type transfer is made, these linefeeds may be
249 distinguished from a record delimiter only when
252 .It Ic delete Ar remote-file
255 on the remote machine.
256 .It Ic debug Op Ar debug-value
257 Toggle debugging mode.
260 is specified, it is used to set the debugging level.
261 When debugging is on,
263 prints each command sent to the remote machine, preceded
266 .It Ic dir Op Ar remote-directory Op Ar local-file
267 Print a listing of the contents of a
268 directory on the remote machine.
269 The listing includes any system-dependent information that the server
270 chooses to include; for example, most
273 output from the command
279 is left unspecified, the current working directory is used.
280 If interactive prompting is on,
282 will prompt the user to verify that the last argument is indeed the
283 target local file for receiving
286 If no local file is specified, or if
290 the output is sent to the terminal.
295 Toggle command line editing, and context sensitive command and file
297 This is automatically enabled if input is from a terminal, and
302 .It Ic ftp Ar host Op Ar port
305 .It Ic form Ar format
306 Set the file transfer
310 The default format is \*(Lqfile\*(Rq.
311 .It Ic get Ar remote-file Op Ar local-file
314 and store it on the local machine.
316 file name is not specified, it is given the same
317 name it has on the remote machine, subject to
318 alteration by the current
324 The current settings for
330 are used while transferring the file.
331 .It Ic gate Op Ar host Op Ar port
332 Toggle gate-ftp mode.
333 This will not be permitted if the gate-ftp server hasn't been set
334 (either explicitly by the user, or from the
336 environment variable).
340 then gate-ftp mode will be enabled, and the gate-ftp server will be set to
344 is also given, that will be used as the port to connect to on the
347 Toggle filename expansion for
352 If globbing is turned off with
354 the file name arguments
355 are taken literally and not expanded.
364 each remote file name is expanded
365 separately on the remote machine and the lists are not merged.
366 Expansion of a directory name is likely to be
367 different from expansion of the name of an ordinary file:
368 the exact result depends on the foreign operating system and ftp server,
369 and can be previewed by doing
370 .Ql mls remote-files \-
375 are not meant to transfer
376 entire directory subtrees of files.
380 archive of the subtree (in binary mode).
381 .It Ic hash Op Ar size
382 Toggle hash-sign (``#'') printing for each data block
384 The size of a data block defaults to 1024 bytes.
385 This can be changed by specifying
388 .It Ic help Op Ar command
389 Print an informative message about the meaning of
391 If no argument is given,
393 prints a list of the known commands.
394 .It Ic idle Op Ar seconds
395 Set the inactivity timer on the remote server to
400 is omitted, the current inactivity timer is printed.
401 .It Ic lcd Op Ar directory
402 Change the working directory on the local machine.
406 is specified, the user's home directory is used.
411 Print the working directory on the local machine.
412 .It Ic \&ls Op Ar remote-directory Op Ar local-file
413 Print a list of the files in a
414 directory on the remote machine.
417 is left unspecified, the current working directory is used.
418 If interactive prompting is on,
420 will prompt the user to verify that the last argument is indeed the
421 target local file for receiving
424 If no local file is specified, or if
428 the output is sent to the terminal.
429 .It Ic macdef Ar macro-name
431 Subsequent lines are stored as the macro
433 a null line (consecutive newline characters
435 carriage returns from the terminal) terminates macro input mode.
436 There is a limit of 16 macros and 4096 total characters in all
438 Macros remain defined until a
441 The macro processor interprets `$' and `\e' as special characters.
442 A `$' followed by a number (or numbers) is replaced by the
443 corresponding argument on the macro invocation command line.
444 A `$' followed by an `i' signals that macro processor that the
445 executing macro is to be looped.
446 On the first pass `$i' is
447 replaced by the first argument on the macro invocation command line,
448 on the second pass it is replaced by the second argument, and so on.
449 A `\e' followed by any character is replaced by that character.
450 Use the `\e' to prevent special treatment of the `$'.
451 .It Ic mdelete Op Ar remote-files
454 on the remote machine.
455 .It Ic mdir Ar remote-files local-file
458 except multiple remote files may be specified.
459 If interactive prompting is on,
461 will prompt the user to verify that the last argument is indeed the
462 target local file for receiving
465 .It Ic mget Ar remote-files
468 on the remote machine
471 for each file name thus produced.
474 for details on the filename expansion.
475 Resulting file names will then be processed according to
481 Files are transferred into the local working directory,
482 which can be changed with
484 new local directories can be created with
485 .Ql "\&! mkdir directory" .
486 .It Ic mkdir Ar directory-name
487 Make a directory on the remote machine.
488 .It Ic mls Ar remote-files local-file
491 except multiple remote files may be specified,
495 If interactive prompting is on,
497 will prompt the user to verify that the last argument is indeed the
498 target local file for receiving
501 .It Ic mode Op Ar mode-name
502 Set the file transfer
506 The default mode is \*(Lqstream\*(Rq mode.
507 .It Ic modtime Ar file-name
508 Show the last modification time of the file on the remote machine.
512 .It Ic mput Ar local-files
513 Expand wild cards in the list of local files given as arguments
516 for each file in the resulting list.
519 for details of filename expansion.
520 Resulting file names will then be processed according to
525 .It Ic msend Ar local-files
528 .It Ic newer Ar file-name
529 Get the file only if the modification time of the remote file is more
530 recent that the file on the current system.
532 exist on the current system, the remote file is considered
534 Otherwise, this command is identical to
536 .It Ic nlist Op Ar remote-directory Op Ar local-file
539 .It Ic nmap Op Ar inpattern outpattern
540 Set or unset the filename mapping mechanism.
541 If no arguments are specified, the filename mapping mechanism is unset.
542 If arguments are specified, remote filenames are mapped during
546 commands issued without a specified remote target filename.
547 If arguments are specified, local filenames are mapped during
551 commands issued without a specified local target filename.
552 This command is useful when connecting to a
555 with different file naming conventions or practices.
556 The mapping follows the pattern set by
561 is a template for incoming filenames (which may have already been
562 processed according to the
567 Variable templating is accomplished by including the
568 sequences `$1', `$2', ..., `$9' in
570 Use `\\' to prevent this special treatment of the `$' character.
571 All other characters are treated literally, and are used to determine the
577 $1.$2 and the remote file name "mydata.data", $1 would have the value
578 "mydata", and $2 would have the value "data".
581 determines the resulting mapped filename.
582 The sequences `$1', `$2', ...., `$9' are replaced by any value resulting
586 The sequence `$0' is replace by the original filename.
587 Additionally, the sequence
588 .Ql Op Ar seq1 , Ar seq2
593 is not a null string; otherwise it is replaced by
595 For example, the command
597 .Bd -literal -offset indent -compact
598 nmap $1.$2.$3 [$1,$2].[$2,file]
602 the output filename "myfile.data" for input filenames "myfile.data" and
603 "myfile.data.old", "myfile.file" for the input filename "myfile", and
604 "myfile.myfile" for the input filename ".myfile".
605 Spaces may be included in
607 as in the example: `nmap $1 sed "s/ *$//" > $1' .
608 Use the `\e' character to prevent special treatment
609 of the `$','[',']' and `,' characters.
610 .It Ic ntrans Op Ar inchars Op Ar outchars
611 Set or unset the filename character translation mechanism.
612 If no arguments are specified, the filename character
613 translation mechanism is unset.
614 If arguments are specified, characters in
615 remote filenames are translated during
619 commands issued without a specified remote target filename.
620 If arguments are specified, characters in
621 local filenames are translated during
625 commands issued without a specified local target filename.
626 This command is useful when connecting to a
629 with different file naming conventions or practices.
630 Characters in a filename matching a character in
632 are replaced with the corresponding character in
634 If the character's position in
636 is longer than the length of
638 the character is deleted from the file name.
639 .It Ic open Ar host Op Ar port
640 Establish a connection to the specified
644 An optional port number may be supplied,
647 will attempt to contact an
652 option is on (default),
654 will also attempt to automatically log the user in to
661 and display with the program defined in
666 Toggle passive mode. If passive mode is turned on
667 (default is off), the ftp client will
670 command for all data connections instead of the usual
674 command requests that the remote server open a port for the data connection
675 and return the address of that port. The remote server listens on that
676 port and the client connects to it. When using the more traditional
678 command, the client listens on a port and sends that address to the remote
679 server, who connects back to it. Passive mode is useful when using
681 through a gateway router or host that controls the directionality of
683 (Note that though ftp servers are required to support the
685 command by RFC 1123, some do not.)
687 Toggle preservation of modification times on retrieved files.
689 Toggle display of transfer progress bar.
690 The progress bar will be disabled for a transfer that has
694 or a command that starts with
697 .Sx FILE NAMING CONVENTIONS
698 for more information.
700 Toggle interactive prompting.
701 Interactive prompting
702 occurs during multiple file transfers to allow the
703 user to selectively retrieve or store files.
704 If prompting is turned off (default is on), any
708 will transfer all files, and any
710 will delete all files.
712 When prompting is on, the following commands are available at a prompt:
713 .Bl -tag -width 2n -offset indent
715 Do not transfer the file.
719 to the current file, and automatically answer
721 to any remaining files for the current command.
725 to the current file, and turn off prompt mode
731 Any other reponse will answer
734 .It Ic proxy Ar ftp-command
735 Execute an ftp command on a secondary control connection.
736 This command allows simultaneous connection to two remote ftp
737 servers for transferring files between the two servers.
742 to establish the secondary control connection.
743 Enter the command "proxy ?" to see other ftp commands executable on the
744 secondary connection.
745 The following commands behave differently when prefaced by
748 will not define new macros during the auto-login process,
750 will not erase existing macro definitions,
754 transfer files from the host on the primary control connection
755 to the host on the secondary control connection, and
760 transfer files from the host on the secondary control connection
761 to the host on the primary control connection.
762 Third party file transfers depend upon support of the ftp protocol
764 command by the server on the secondary control connection.
765 .It Ic put Ar local-file Op Ar remote-file
766 Store a local file on the remote machine.
769 is left unspecified, the local file name is used
770 after processing according to any
775 in naming the remote file.
776 File transfer uses the
784 Print the name of the current working directory on the remote
789 .It Ic quote Ar arg1 arg2 ...
790 The arguments specified are sent, verbatim, to the remote
793 .It Ic recv Ar remote-file Op Ar local-file
796 .It Ic reget Ar remote-file Op Ar local-file
797 Reget acts like get, except that if
804 a partially transferred copy of
807 is continued from the apparent point of failure.
809 is useful when transferring very large files over networks that
810 are prone to dropping connections.
811 .It Ic remotehelp Op Ar command-name
812 Request help from the remote
817 is specified it is supplied to the server as well.
818 .It Ic rstatus Op Ar file-name
819 With no arguments, show status of remote machine.
822 is specified, show status of
825 .It Ic rename Op Ar from Op Ar to
828 on the remote machine, to the file
832 This command re-synchronizes command/reply sequencing with the remote
834 Resynchronization may be necessary following a violation of the ftp protocol
835 by the remote server.
836 .It Ic restart Ar marker
837 Restart the immediately following
846 systems, marker is usually a byte
847 offset into the file.
849 Toggle data port range restrictions.
850 When not operating in passive mode, the
852 client program requests that the remote server open a connection back
853 to the client host on a separate data port. In previous versions, that
854 remote port fell in the range 1024..4999. However, most firewall setups
855 filter that range of TCP ports because other services reside there.
856 The default behavior now is for the client to request that the server
857 connect back to the client using the port range 49152..65535. Firewall
858 administrators can chose to allow TCP connections in that range, if they
859 deem it to not be a security risk.
860 .It Ic rmdir Ar directory-name
861 Delete a directory on the remote machine.
863 Toggle storing of files on the local system with unique filenames.
864 If a file already exists with a name equal to the target
869 command, a ".1" is appended to the name.
870 If the resulting name matches another existing file,
871 a ".2" is appended to the original name.
872 If this process continues up to ".99", an error
873 message is printed, and the transfer does not take place.
874 The generated unique filename will be reported.
877 will not affect local files generated from a shell command
879 The default value is off.
880 .It Ic send Ar local-file Op Ar remote-file
889 will attempt to use a
891 command when establishing
892 a connection for each data transfer.
895 commands can prevent delays
896 when performing multiple file transfers.
901 will use the default data port.
904 commands is disabled, no attempt will be made to use
906 commands for each data transfer.
910 implementations which do ignore
912 commands but, incorrectly, indicate they've been accepted.
913 .It Ic site Ar arg1 arg2 ...
914 The arguments specified are sent, verbatim, to the remote
919 .It Ic size Ar file-name
924 Show the current status of
926 .It Ic struct Op Ar struct-name
927 Set the file transfer
931 By default \*(Lqstream\*(Rq structure is used.
933 Toggle storing of files on remote machine under unique file names.
934 Remote ftp server must support ftp protocol
937 successful completion.
938 The remote server will report unique name.
939 Default value is off.
941 Show the type of operating system running on the remote machine.
943 Set the file transfer type to that needed to
948 Toggle packet tracing.
949 .It Ic type Op Ar type-name
950 Set the file transfer
954 If no type is specified, the current type
956 The default type is network
958 .It Ic umask Op Ar newmask
959 Set the default umask on the remote server to
963 is omitted, the current umask is printed.
965 .Ic user Ar user-name
966 .Op Ar password Op Ar account
968 Identify yourself to the remote
973 is not specified and the server requires it,
975 will prompt the user for it (after disabling local echo).
978 field is not specified, and the
981 requires it, the user will be prompted for it.
984 field is specified, an account command will
985 be relayed to the remote server after the login sequence
986 is completed if the remote server did not require it
990 is invoked with \*(Lqauto-login\*(Rq disabled, this
991 process is done automatically on initial connection to
997 In verbose mode, all responses from
1000 server are displayed to the user.
1002 if verbose is on, when a file transfer completes, statistics
1003 regarding the efficiency of the transfer are reported.
1006 .It Ic ? Op Ar command
1011 Command arguments which have embedded spaces may be quoted with
1014 Commands which toggle settings can take an explicit
1018 argument to force the setting appropriately.
1028 signal whilst a transfer is in progress, the current transfer rate
1029 statistics will be written to the standard error output, in the
1030 same format as the standard completion message.
1031 .Sh AUTO-FETCHING FILES
1032 In addition to standard commands, this version of
1034 supports an auto-fetch feature.
1035 To enable auto-fetch, simply pass the list of hostnames/files
1036 on the command line.
1038 The following formats are valid syntax for an auto-fetch element:
1039 .Bl -tag -width "host:/file"
1043 .It ftp://[user:password@]host[:port]/file
1044 An ftp URL, retrieved using the ftp protocol if
1047 Otherwise, transfer using http via the proxy defined in
1053 isn't defined, login as
1057 .It http://host[:port]/file
1058 An HTTP URL, retrieved using the http protocol.
1061 is defined, it is used as a URL to an HTTP proxy server.
1064 If a classic format or a ftp URL format has a trailing
1068 will connect to the site and
1070 to the directory given as the path, and leave the user in interactive
1071 mode ready for further input.
1073 If successive auto-fetch ftp elements refer to the same host, then
1074 the connection is maintained between transfers, reducing overhead on
1075 connection creation and deletion.
1079 contains a glob character and globbing is enabled,
1082 then the equivalent of
1086 If the directory component of
1088 contains no globbing characters,
1089 it is stored in the current directory as the
1093 Otherwise, the remote name is used as the local name.
1094 .Sh ABORTING A FILE TRANSFER
1095 To abort a file transfer, use the terminal interrupt key
1097 Sending transfers will be immediately halted.
1098 Receiving transfers will be halted by sending a ftp protocol
1100 command to the remote server, and discarding any further data received.
1101 The speed at which this is accomplished depends upon the remote
1102 server's support for
1105 If the remote server does not support the
1109 prompt will not appear until the remote server has completed
1110 sending the requested file.
1112 The terminal interrupt key sequence will be ignored when
1114 has completed any local processing and is awaiting a reply
1115 from the remote server.
1116 A long delay in this mode may result from the ABOR processing described
1117 above, or from unexpected behavior by the remote server, including
1118 violations of the ftp protocol.
1119 If the delay results from unexpected remote server behavior, the local
1121 program must be killed by hand.
1122 .Sh FILE NAMING CONVENTIONS
1123 Files specified as arguments to
1125 commands are processed according to the following rules.
1134 (for writing) is used.
1136 If the first character of the file name is
1139 remainder of the argument is interpreted as a shell command.
1141 then forks a shell, using
1143 with the argument supplied, and reads (writes) from the stdin
1145 If the shell command includes spaces, the argument
1146 must be quoted; e.g.
1147 \*(Lq" ls -lt"\*(Rq.
1149 useful example of this mechanism is: \*(Lqdir \&|more\*(Rq.
1151 Failing the above checks, if
1154 local file names are expanded
1155 according to the rules used in the
1162 command expects a single local file (e.g.
1164 only the first filename generated by the "globbing" operation is used.
1170 commands with unspecified local file names, the local filename is
1171 the remote filename, which may be altered by a
1177 The resulting filename may then be altered if
1185 commands with unspecified remote file names, the remote filename is
1186 the local filename, which may be altered by a
1191 The resulting filename may then be altered by the remote server if
1195 .Sh FILE TRANSFER PARAMETERS
1196 The FTP specification specifies many parameters which may
1197 affect a file transfer.
1200 may be one of \*(Lqascii\*(Rq, \*(Lqimage\*(Rq (binary),
1201 \*(Lqebcdic\*(Rq and \*(Lqlocal byte size\*(Rq (for
1207 supports the ascii and image types of file transfer,
1208 plus local byte size 8 for
1213 supports only the default values for the remaining
1214 file transfer parameters:
1222 file contains login and initialization information
1223 used by the auto-login process.
1224 It resides in the user's home directory.
1225 The following tokens are recognized; they may be separated by spaces,
1227 .Bl -tag -width password
1228 .It Ic machine Ar name
1229 Identify a remote machine
1231 The auto-login process searches the
1235 token that matches the remote machine specified on the
1237 command line or as an
1240 Once a match is made, the subsequent
1242 tokens are processed,
1243 stopping when the end of file is reached or another
1247 token is encountered.
1255 There can be only one
1257 token, and it must be after all
1260 This is normally used as:
1262 .Dl default login anonymous password user@site
1264 thereby giving the user
1266 anonymous ftp login to
1267 machines not specified in
1269 This can be overridden
1272 flag to disable auto-login.
1273 .It Ic login Ar name
1274 Identify a user on the remote machine.
1275 If this token is present, the auto-login process will initiate
1276 a login using the specified
1278 .It Ic password Ar string
1280 If this token is present, the auto-login process will supply the
1281 specified string if the remote server requires a password as part
1282 of the login process.
1283 Note that if this token is present in the
1285 file for any user other
1289 will abort the auto-login process if the
1292 anyone besides the user.
1293 .It Ic account Ar string
1294 Supply an additional account password.
1295 If this token is present, the auto-login process will supply the
1296 specified string if the remote server requires an additional
1297 account password, or the auto-login process will initiate an
1299 command if it does not.
1300 .It Ic macdef Ar name
1302 This token functions like the
1306 A macro is defined with the specified name; its contents begin with the
1309 line and continue until a null line (consecutive new-line
1310 characters) is encountered.
1313 is defined, it is automatically executed as the last step in the
1316 .Sh COMMAND LINE EDITING
1318 supports interactive command line editing, via the
1321 It is enabled with the
1323 command, and is enabled by default if input is from a tty.
1324 Previous lines can be recalled and edited with the arrow keys,
1325 and other GNU Emacs-style editing keys may be used as well.
1329 library is configured with a
1333 for more information.
1335 An extra key binding is available to
1337 to provide context sensitive command and filename completion
1338 (including remote file completion).
1339 To use this, bind a key to the
1343 By default, this is bound to the TAB key.
1346 utilizes the following environment variables.
1347 .Bl -tag -width "FTP_PASSIVE_MODE"
1348 .It Ev FTP_PASSIVE_MODE
1349 If this variable is set to something else than
1352 will use passive mode by default.
1354 Host to use as gate-ftp server when
1357 .It Ev FTPSERVERPORT
1358 Port to use when connecting to gate-ftp server when
1361 Default is port returned by a
1366 For default location of a
1368 file, if one exists.
1376 URL of FTP proxy to use when making FTP URL requests
1377 (if not defined, use the standard ftp protocol).
1379 URL of HTTP proxy to use when making HTTP URL requests.
1382 .Xr getservbyname 3 ,
1391 commands are links to
1399 Various features such as command line editing, context sensitive
1400 command and file completion, dynamic progress bar, automatic
1401 fetching of files, ftp and http URLs, and modification time
1402 preservation were implemented in
1404 by Luke Mewburn, with assistance from Jason Thorpe.
1406 Correct execution of many commands depends upon proper behavior
1407 by the remote server.
1409 An error in the treatment of carriage returns
1412 ascii-mode transfer code
1414 This correction may result in incorrect transfers of binary files
1417 servers using the ascii type.
1418 Avoid this problem by using the binary image type.