1 .\" $Id: ftp.1,v 1.7 1997/12/13 20:38:17 pst Exp $
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
59 .Op Ar host Op Ar port
61 ftp://[\fIuser\fR:\fIpassword\fR@]\fIhost\fR[:\fIport\fR]/\fIfile\fR[/]
63 http://\fIhost\fR[:\fIport\fR]/\fIfile\fR
65 \fIhost\fR:[/\fIpath\fR/]\fIfile\fR[/]
68 is the user interface to the
70 standard File Transfer Protocol.
71 The program allows a user to transfer files to and from a
74 The latter three usage formats will fetch a file using either the
75 HTTP or FTP protocols into the current directory.
76 This is ideal for scripts.
78 .Sx AUTO-FETCHING FILES
79 below for more information.
81 Options may be specified at the command line, or to the
83 .Bl -tag -width "port "
87 to bypass normal login procedure, and use an anonymous login instead.
91 Disables command line editing.
93 Disables file name globbing.
95 Disable data port range restrictions.
97 Turns off interactive prompting during
98 multiple file transfers.
104 upon initial connection.
105 If auto-login is enabled,
109 (see below) file in the user's home directory for an entry describing
110 an account on the remote machine.
113 will prompt for the remote machine login name (default is the user
114 identity on the local machine), and, if necessary, prompt for a password
115 and an account with which to login.
117 Enable passive mode operation for use behind connection filtering firewalls.
120 command has the same effect.
122 Sets the port number to
125 Enables packet tracing.
128 This is the default if input is from a terminal.
131 to show all responses from the remote server, as well
132 as report on data transfer statistics.
134 Disable verbose mode, overriding the default of enabled when input
138 The client host with which
140 is to communicate may be specified on the command line.
143 will immediately attempt to establish a connection to an
145 server on that host; otherwise,
147 will enter its command interpreter and await instructions
151 is awaiting commands from the user the prompt
153 is provided to the user.
154 The following commands are recognized
158 .It Ic \&! Op Ar command Op Ar args
159 Invoke an interactive shell on the local machine.
160 If there are arguments, the first is taken to be a command to execute
161 directly, with the rest of the arguments as its arguments.
162 .It Ic \&$ Ar macro-name Op Ar args
165 that was defined with the
168 Arguments are passed to the macro unglobbed.
169 .It Ic account Op Ar passwd
170 Supply a supplemental password required by a remote system for access
171 to resources once a login has been successfully completed.
172 If no argument is included, the user will be prompted for an account
173 password in a non-echoing input mode.
174 .It Ic append Ar local-file Op Ar remote-file
175 Append a local file to a file on the remote machine.
178 is left unspecified, the local file name is used in naming the
179 remote file after being altered by any
184 File transfer uses the current settings for
191 Set the file transfer
195 This is the default type.
197 Arrange that a bell be sounded after each file transfer
198 command is completed.
200 Set the file transfer
202 to support binary image transfer.
206 session with the remote server
209 An end of file will also terminate the session and exit.
211 Toggle remote computer file name case mapping during
216 is on (default is off), remote computer file names with all letters in
217 upper case are written in the local directory with the letters mapped
219 .It Ic \&cd Ar remote-directory
220 Change the working directory on the remote machine
222 .Ar remote-directory .
224 Change the remote machine working directory to the parent of the
225 current remote machine working directory.
226 .It Ic chmod Ar mode file-name
227 Change the permission modes of the file
235 session with the remote server, and
236 return to the command interpreter.
237 Any defined macros are erased.
239 Toggle carriage return stripping during
240 ascii type file retrieval.
241 Records are denoted by a carriage return/linefeed sequence
242 during ascii type file transfer.
245 is on (the default), carriage returns are stripped from this
246 sequence to conform with the
248 single linefeed record
252 remote systems may contain single linefeeds;
253 when an ascii type transfer is made, these linefeeds may be
254 distinguished from a record delimiter only when
257 .It Ic delete Ar remote-file
260 on the remote machine.
261 .It Ic debug Op Ar debug-value
262 Toggle debugging mode.
265 is specified it is used to set the debugging level.
266 When debugging is on,
268 prints each command sent to the remote machine, preceded
271 .It Ic dir Op Ar remote-directory Op Ar local-file
272 Print a listing of the contents of a
273 directory on the remote machine.
274 The listing includes any system-dependent information that the server
275 chooses to include; for example, most
278 output from the command
284 is left unspecified, the current working directory is used.
285 If interactive prompting is on,
287 will prompt the user to verify that the last argument is indeed the
288 target local file for receiving
291 If no local file is specified, or if
295 the output is sent to the terminal.
300 Toggle command line editing, and context sensitive command and file
302 This is automatically enabled if input is from a terminal, and
307 .It Ic ftp Ar host Op Ar port
310 .It Ic form Ar format
311 Set the file transfer
315 The default format is \*(Lqfile\*(Rq.
316 .It Ic get Ar remote-file Op Ar local-file
319 and store it on the local machine.
321 file name is not specified, it is given the same
322 name it has on the remote machine, subject to
323 alteration by the current
329 The current settings for
335 are used while transferring the file.
336 .It Ic gate Op Ar host Op Ar port
337 Toggle gate-ftp mode.
338 This will not be permitted if the gate-ftp server hasn't been set
339 (either explicitly by the user, or from the
341 environment variable).
345 then gate-ftp mode will be enabled, and the gate-ftp server will be set to
349 is also given, that will be used as the port to connect to on the
352 Toggle filename expansion for
357 If globbing is turned off with
359 the file name arguments
360 are taken literally and not expanded.
369 each remote file name is expanded
370 separately on the remote machine and the lists are not merged.
371 Expansion of a directory name is likely to be
372 different from expansion of the name of an ordinary file:
373 the exact result depends on the foreign operating system and ftp server,
374 and can be previewed by doing
375 .Ql mls remote-files \-
380 are not meant to transfer
381 entire directory subtrees of files.
385 archive of the subtree (in binary mode).
386 .It Ic hash Op Ar size
387 Toggle hash-sign (``#'') printing for each data block
389 The size of a data block defaults to 1024 bytes.
390 This can be changed by specifying
393 .It Ic help Op Ar command
394 Print an informative message about the meaning of
396 If no argument is given,
398 prints a list of the known commands.
399 .It Ic idle Op Ar seconds
400 Set the inactivity timer on the remote server to
405 is omitted, the current inactivity timer is printed.
406 .It Ic lcd Op Ar directory
407 Change the working directory on the local machine.
411 is specified, the user's home directory is used.
416 Print the working directory on the local machine.
417 .It Ic \&ls Op Ar remote-directory Op Ar local-file
418 Print a list of the files in a
419 directory on the remote machine.
422 is left unspecified, the current working directory is used.
423 If interactive prompting is on,
425 will prompt the user to verify that the last argument is indeed the
426 target local file for receiving
429 If no local file is specified, or if
433 the output is sent to the terminal.
434 .It Ic macdef Ar macro-name
436 Subsequent lines are stored as the macro
438 a null line (consecutive newline characters
440 carriage returns from the terminal) terminates macro input mode.
441 There is a limit of 16 macros and 4096 total characters in all
443 Macros remain defined until a
446 The macro processor interprets `$' and `\e' as special characters.
447 A `$' followed by a number (or numbers) is replaced by the
448 corresponding argument on the macro invocation command line.
449 A `$' followed by an `i' signals that macro processor that the
450 executing macro is to be looped.
451 On the first pass `$i' is
452 replaced by the first argument on the macro invocation command line,
453 on the second pass it is replaced by the second argument, and so on.
454 A `\e' followed by any character is replaced by that character.
455 Use the `\e' to prevent special treatment of the `$'.
456 .It Ic mdelete Op Ar remote-files
459 on the remote machine.
460 .It Ic mdir Ar remote-files local-file
463 except multiple remote files may be specified.
464 If interactive prompting is on,
466 will prompt the user to verify that the last argument is indeed the
467 target local file for receiving
470 .It Ic mget Ar remote-files
473 on the remote machine
476 for each file name thus produced.
479 for details on the filename expansion.
480 Resulting file names will then be processed according to
486 Files are transferred into the local working directory,
487 which can be changed with
489 new local directories can be created with
490 .Ql "\&! mkdir directory" .
491 .It Ic mkdir Ar directory-name
492 Make a directory on the remote machine.
493 .It Ic mls Ar remote-files local-file
496 except multiple remote files may be specified,
500 If interactive prompting is on,
502 will prompt the user to verify that the last argument is indeed the
503 target local file for receiving
506 .It Ic mode Op Ar mode-name
507 Set the file transfer
511 The default mode is \*(Lqstream\*(Rq mode.
512 .It Ic modtime Ar file-name
513 Show the last modification time of the file on the remote machine.
517 .It Ic mput Ar local-files
518 Expand wild cards in the list of local files given as arguments
521 for each file in the resulting list.
524 for details of filename expansion.
525 Resulting file names will then be processed according to
530 .It Ic msend Ar local-files
533 .It Ic newer Ar file-name
534 Get the file only if the modification time of the remote file is more
535 recent that the file on the current system.
537 exist on the current system, the remote file is considered
539 Otherwise, this command is identical to
541 .It Ic nlist Op Ar remote-directory Op Ar local-file
544 .It Ic nmap Op Ar inpattern outpattern
545 Set or unset the filename mapping mechanism.
546 If no arguments are specified, the filename mapping mechanism is unset.
547 If arguments are specified, remote filenames are mapped during
551 commands issued without a specified remote target filename.
552 If arguments are specified, local filenames are mapped during
556 commands issued without a specified local target filename.
557 This command is useful when connecting to a
560 with different file naming conventions or practices.
561 The mapping follows the pattern set by
566 is a template for incoming filenames (which may have already been
567 processed according to the
572 Variable templating is accomplished by including the
573 sequences `$1', `$2', ..., `$9' in
575 Use `\\' to prevent this special treatment of the `$' character.
576 All other characters are treated literally, and are used to determine the
582 $1.$2 and the remote file name "mydata.data", $1 would have the value
583 "mydata", and $2 would have the value "data".
586 determines the resulting mapped filename.
587 The sequences `$1', `$2', ...., `$9' are replaced by any value resulting
591 The sequence `$0' is replace by the original filename.
592 Additionally, the sequence
593 .Ql Op Ar seq1 , Ar seq2
598 is not a null string; otherwise it is replaced by
600 For example, the command
602 .Bd -literal -offset indent -compact
603 nmap $1.$2.$3 [$1,$2].[$2,file]
607 the output filename "myfile.data" for input filenames "myfile.data" and
608 "myfile.data.old", "myfile.file" for the input filename "myfile", and
609 "myfile.myfile" for the input filename ".myfile".
610 Spaces may be included in
612 as in the example: `nmap $1 sed "s/ *$//" > $1' .
613 Use the `\e' character to prevent special treatment
614 of the `$','[',']', and `,' characters.
615 .It Ic ntrans Op Ar inchars Op Ar outchars
616 Set or unset the filename character translation mechanism.
617 If no arguments are specified, the filename character
618 translation mechanism is unset.
619 If arguments are specified, characters in
620 remote filenames are translated during
624 commands issued without a specified remote target filename.
625 If arguments are specified, characters in
626 local filenames are translated during
630 commands issued without a specified local target filename.
631 This command is useful when connecting to a
634 with different file naming conventions or practices.
635 Characters in a filename matching a character in
637 are replaced with the corresponding character in
639 If the character's position in
641 is longer than the length of
643 the character is deleted from the file name.
644 .It Ic open Ar host Op Ar port
645 Establish a connection to the specified
649 An optional port number may be supplied,
652 will attempt to contact an
657 option is on (default),
659 will also attempt to automatically log the user in to
666 and display with the program defined in
671 Toggle passive mode. If passive mode is turned on
672 (default is off), the ftp client will
675 command for all data connections instead of the usual
679 command requests that the remote server open a port for the data connection
680 and return the address of that port. The remote server listens on that
681 port and the client connects to it. When using the more traditional
683 command, the client listens on a port and sends that address to the remote
684 server, who connects back to it. Passive mode is useful when using
686 through a gateway router or host that controls the directionality of
688 (Note that though ftp servers are required to support the
690 command by RFC 1123, some do not.)
692 Toggle preservation of modification times on retrieved files.
694 Toggle display of transfer progress bar.
695 The progress bar will be disabled for a transfer that has
699 or a command that starts with
702 .Sx FILE NAMING CONVENTIONS
703 for more information.
705 Toggle interactive prompting.
706 Interactive prompting
707 occurs during multiple file transfers to allow the
708 user to selectively retrieve or store files.
709 If prompting is turned off (default is on), any
713 will transfer all files, and any
715 will delete all files.
717 When prompting is on, the following commands are available at a prompt:
718 .Bl -tag -width 2n -offset indent
720 Do not transfer the file.
724 to the current file, and automatically answer
726 to any remaining files for the current command.
730 to the current file, and turn off prompt mode
736 Any other reponse will answer
739 .It Ic proxy Ar ftp-command
740 Execute an ftp command on a secondary control connection.
741 This command allows simultaneous connection to two remote ftp
742 servers for transferring files between the two servers.
747 to establish the secondary control connection.
748 Enter the command "proxy ?" to see other ftp commands executable on the
749 secondary connection.
750 The following commands behave differently when prefaced by
753 will not define new macros during the auto-login process,
755 will not erase existing macro definitions,
759 transfer files from the host on the primary control connection
760 to the host on the secondary control connection, and
765 transfer files from the host on the secondary control connection
766 to the host on the primary control connection.
767 Third party file transfers depend upon support of the ftp protocol
769 command by the server on the secondary control connection.
770 .It Ic put Ar local-file Op Ar remote-file
771 Store a local file on the remote machine.
774 is left unspecified, the local file name is used
775 after processing according to any
780 in naming the remote file.
781 File transfer uses the
789 Print the name of the current working directory on the remote
794 .It Ic quote Ar arg1 arg2 ...
795 The arguments specified are sent, verbatim, to the remote
798 .It Ic recv Ar remote-file Op Ar local-file
801 .It Ic reget Ar remote-file Op Ar local-file
802 Reget acts like get, except that if
809 a partially transferred copy of
812 is continued from the apparent point of failure.
814 is useful when transferring very large files over networks that
815 are prone to dropping connections.
816 .It Ic remotehelp Op Ar command-name
817 Request help from the remote
822 is specified it is supplied to the server as well.
823 .It Ic rstatus Op Ar file-name
824 With no arguments, show status of remote machine.
827 is specified, show status of
830 .It Ic rename Op Ar from Op Ar to
833 on the remote machine, to the file
837 This command re-synchronizes command/reply sequencing with the remote
839 Resynchronization may be necessary following a violation of the ftp protocol
840 by the remote server.
841 .It Ic restart Ar marker
842 Restart the immediately following
851 systems, marker is usually a byte
852 offset into the file.
854 Toggle data port range restrictions.
855 When not operating in passive mode, the
857 client program requests that the remote server open a connection back
858 to the client host on a separate data port. In previous versions, that
859 remote port fell in the range 1024..4999. However, most firewall setups
860 filter that range of TCP ports because other services reside there.
861 The default behavior now is for the client to request that the server
862 connect back to the client using the port range 40000..44999. Firewall
863 administrators can chose to allow TCP connections in that range, if they
864 deem it to not be a security risk.
865 .It Ic rmdir Ar directory-name
866 Delete a directory on the remote machine.
868 Toggle storing of files on the local system with unique filenames.
869 If a file already exists with a name equal to the target
874 command, a ".1" is appended to the name.
875 If the resulting name matches another existing file,
876 a ".2" is appended to the original name.
877 If this process continues up to ".99", an error
878 message is printed, and the transfer does not take place.
879 The generated unique filename will be reported.
882 will not affect local files generated from a shell command
884 The default value is off.
885 .It Ic send Ar local-file Op Ar remote-file
894 will attempt to use a
896 command when establishing
897 a connection for each data transfer.
900 commands can prevent delays
901 when performing multiple file transfers.
906 will use the default data port.
909 commands is disabled, no attempt will be made to use
911 commands for each data transfer.
915 implementations which do ignore
917 commands but, incorrectly, indicate they've been accepted.
918 .It Ic site Ar arg1 arg2 ...
919 The arguments specified are sent, verbatim, to the remote
924 .It Ic size Ar file-name
929 Show the current status of
931 .It Ic struct Op Ar struct-name
932 Set the file transfer
936 By default \*(Lqstream\*(Rq structure is used.
938 Toggle storing of files on remote machine under unique file names.
939 Remote ftp server must support ftp protocol
942 successful completion.
943 The remote server will report unique name.
944 Default value is off.
946 Show the type of operating system running on the remote machine.
948 Set the file transfer type to that needed to
953 Toggle packet tracing.
954 .It Ic type Op Ar type-name
955 Set the file transfer
959 If no type is specified, the current type
961 The default type is network
963 .It Ic umask Op Ar newmask
964 Set the default umask on the remote server to
968 is omitted, the current umask is printed.
970 .Ic user Ar user-name
971 .Op Ar password Op Ar account
973 Identify yourself to the remote
978 is not specified and the server requires it,
980 will prompt the user for it (after disabling local echo).
983 field is not specified, and the
986 requires it, the user will be prompted for it.
989 field is specified, an account command will
990 be relayed to the remote server after the login sequence
991 is completed if the remote server did not require it
995 is invoked with \*(Lqauto-login\*(Rq disabled, this
996 process is done automatically on initial connection to
1001 Toggle verbose mode.
1002 In verbose mode, all responses from
1005 server are displayed to the user.
1007 if verbose is on, when a file transfer completes, statistics
1008 regarding the efficiency of the transfer are reported.
1011 .It Ic ? Op Ar command
1016 Command arguments which have embedded spaces may be quoted with
1019 Commands which toggle settings can take an explicit
1023 argument to force the setting appropriately.
1033 signal whilst a transfer is in progress, the current transfer rate
1034 statistics will be written to the standard error output, in the
1035 same format as the standard completion message.
1036 .Sh AUTO-FETCHING FILES
1037 In addition to standard commands, this version of
1039 supports an auto-fetch feature.
1040 To enable auto-fetch, simply pass the list of hostnames/files
1041 on the command line.
1043 The following formats are valid syntax for an auto-fetch element:
1044 .Bl -tag -width "host:/file"
1048 .It ftp://[user:password@]host[:port]/file
1049 An ftp URL, retrieved using the ftp protocol if
1052 Otherwise, transfer using http via the proxy defined in
1058 isn't defined, login as
1062 .It http://host[:port]/file
1063 An HTTP URL, retrieved using the http protocol.
1066 is defined, it is used as a URL to an HTTP proxy server.
1069 If a classic format or a ftp URL format has a trailing
1073 will connect to the site and
1075 to the directory given as the path, and leave the user in interactive
1076 mode ready for further input.
1078 If successive auto-fetch ftp elements refer to the same host, then
1079 the connection is maintained between transfers, reducing overhead on
1080 connection creation and deletion.
1084 contains a glob character and globbing is enabled,
1087 then the equivalent of
1091 If the directory component of
1093 contains no globbing characters,
1094 it is stored in the current directory as the
1098 Otherwise, the remote name is used as the local name.
1099 .Sh ABORTING A FILE TRANSFER
1100 To abort a file transfer, use the terminal interrupt key
1102 Sending transfers will be immediately halted.
1103 Receiving transfers will be halted by sending a ftp protocol
1105 command to the remote server, and discarding any further data received.
1106 The speed at which this is accomplished depends upon the remote
1107 server's support for
1110 If the remote server does not support the
1114 prompt will not appear until the remote server has completed
1115 sending the requested file.
1117 The terminal interrupt key sequence will be ignored when
1119 has completed any local processing and is awaiting a reply
1120 from the remote server.
1121 A long delay in this mode may result from the ABOR processing described
1122 above, or from unexpected behavior by the remote server, including
1123 violations of the ftp protocol.
1124 If the delay results from unexpected remote server behavior, the local
1126 program must be killed by hand.
1127 .Sh FILE NAMING CONVENTIONS
1128 Files specified as arguments to
1130 commands are processed according to the following rules.
1139 (for writing) is used.
1141 If the first character of the file name is
1144 remainder of the argument is interpreted as a shell command.
1146 then forks a shell, using
1148 with the argument supplied, and reads (writes) from the stdin
1150 If the shell command includes spaces, the argument
1151 must be quoted; e.g.
1152 \*(Lq" ls -lt"\*(Rq.
1154 useful example of this mechanism is: \*(Lqdir \&|more\*(Rq.
1156 Failing the above checks, if ``globbing'' is enabled,
1157 local file names are expanded
1158 according to the rules used in the
1165 command expects a single local file (.e.g.
1167 only the first filename generated by the "globbing" operation is used.
1173 commands with unspecified local file names, the local filename is
1174 the remote filename, which may be altered by a
1180 The resulting filename may then be altered if
1188 commands with unspecified remote file names, the remote filename is
1189 the local filename, which may be altered by a
1194 The resulting filename may then be altered by the remote server if
1198 .Sh FILE TRANSFER PARAMETERS
1199 The FTP specification specifies many parameters which may
1200 affect a file transfer.
1203 may be one of \*(Lqascii\*(Rq, \*(Lqimage\*(Rq (binary),
1204 \*(Lqebcdic\*(Rq, and \*(Lqlocal byte size\*(Rq (for
1210 supports the ascii and image types of file transfer,
1211 plus local byte size 8 for
1216 supports only the default values for the remaining
1217 file transfer parameters:
1225 file contains login and initialization information
1226 used by the auto-login process.
1227 It resides in the user's home directory.
1228 The following tokens are recognized; they may be separated by spaces,
1230 .Bl -tag -width password
1231 .It Ic machine Ar name
1232 Identify a remote machine
1234 The auto-login process searches the
1238 token that matches the remote machine specified on the
1240 command line or as an
1243 Once a match is made, the subsequent
1245 tokens are processed,
1246 stopping when the end of file is reached or another
1250 token is encountered.
1258 There can be only one
1260 token, and it must be after all
1263 This is normally used as:
1265 .Dl default login anonymous password user@site
1267 thereby giving the user
1269 anonymous ftp login to
1270 machines not specified in
1272 This can be overridden
1275 flag to disable auto-login.
1276 .It Ic login Ar name
1277 Identify a user on the remote machine.
1278 If this token is present, the auto-login process will initiate
1279 a login using the specified
1281 .It Ic password Ar string
1283 If this token is present, the auto-login process will supply the
1284 specified string if the remote server requires a password as part
1285 of the login process.
1286 Note that if this token is present in the
1288 file for any user other
1292 will abort the auto-login process if the
1295 anyone besides the user.
1296 .It Ic account Ar string
1297 Supply an additional account password.
1298 If this token is present, the auto-login process will supply the
1299 specified string if the remote server requires an additional
1300 account password, or the auto-login process will initiate an
1302 command if it does not.
1303 .It Ic macdef Ar name
1305 This token functions like the
1309 A macro is defined with the specified name; its contents begin with the
1312 line and continue until a null line (consecutive new-line
1313 characters) is encountered.
1316 is defined, it is automatically executed as the last step in the
1319 .Sh COMMAND LINE EDITING
1321 supports interactive command line editing, via the
1324 It is enabled with the
1326 command, and is enabled by default if input is from a tty.
1327 Previous lines can be recalled and edited with the arrow keys,
1328 and other GNU Emacs-style editing keys may be used as well.
1332 library is configured with a
1336 for more information.
1338 An extra key binding is available to
1340 to provide context sensitive command and filename completion
1341 (including remote file completion).
1342 To use this, bind a key to the
1346 By default, this is bound to the TAB key.
1349 utilizes the following environment variables.
1350 .Bl -tag -width "FTP_PASSIVE_MODE"
1351 .It Ev FTP_PASSIVE_MODE
1352 Use passive mode FTP 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.