1 .\" $FreeBSD: src/usr.bin/ftp/ftp.1,v 1.15.2.7 2002/08/27 09:55:08 yar Exp $
2 .\" $DragonFly: src/usr.bin/ftp/Attic/ftp.1,v 1.2 2003/06/17 04:29:26 dillon Exp $
3 .\" $NetBSD: ftp.1,v 1.21 1997/06/10 21:59:58 lukem Exp $
5 .\" Copyright (c) 1985, 1989, 1990, 1993
6 .\" The Regents of the University of California. All rights reserved.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. All advertising materials mentioning features or use of this software
17 .\" must display the following acknowledgement:
18 .\" This product includes software developed by the University of
19 .\" California, Berkeley and its contributors.
20 .\" 4. Neither the name of the University nor the names of its contributors
21 .\" may be used to endorse or promote products derived from this software
22 .\" without specific prior written permission.
24 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94
42 .Nm ftp , pftp , gate-ftp
51 .Op Ar host Op Ar port
53 ftp://[\fIuser\fR:\fIpassword\fR@]\fIhost\fR[:\fIport\fR]/\fIfile\fR[/]
55 http://\fIhost\fR[:\fIport\fR]/\fIfile\fR
57 \fIhost\fR:[/\fIpath\fR/]\fIfile\fR[/]
60 is the user interface to the
62 standard File Transfer Protocol.
63 The program allows a user to transfer files to and from a
65 The version supports IPv6 (Internet protocol version 6), as well as IPv4.
67 The latter three usage formats will fetch a file using either the
68 HTTP or FTP protocols into the current directory.
69 This is ideal for scripts.
71 .Sx AUTO-FETCHING FILES
72 below for more information.
74 Options may be specified at the command line, or to the
80 to use IPv4 addresses only.
84 to use IPv6 addresses only.
88 to bypass normal login procedure, and use an anonymous login instead.
92 Disables command line editing.
94 Disables file name globbing.
96 Turns off interactive prompting during
97 multiple file transfers.
103 upon initial connection.
104 If auto-login is enabled,
108 (see below) file in the user's home directory for an entry describing
109 an account on the remote machine.
112 will prompt for the remote machine login name (default is the user
113 identity on the local machine), and, if necessary, prompt for a password
114 and an account with which to login.
116 Enables passive mode operation for use behind connection filtering firewalls.
119 command has the same effect.
121 Sets the port number to
124 Sets the local IP address for all connections to
126 which can be an IP address or a host name.
128 Enables packet tracing.
130 Disable data port range restrictions.
133 This is the default if input is from a terminal.
136 to show all responses from the remote server, as well
137 as report on data transfer statistics.
139 Disable verbose mode, overriding the default of enabled when input
143 The client host with which
145 is to communicate may be specified on the command line.
148 will immediately attempt to establish a connection to an
150 server on that host; otherwise,
152 will enter its command interpreter and await instructions
156 is awaiting commands from the user the prompt
158 is provided to the user.
159 The following commands are recognized
163 .It Ic \&! Op Ar command Op Ar args
164 Invoke an interactive shell on the local machine.
165 If there are arguments, the first is taken to be a command to execute
166 directly, with the rest of the arguments as its arguments.
167 .It Ic \&$ Ar macro-name Op Ar args
170 that was defined with the
173 Arguments are passed to the macro unglobbed.
174 .It Ic account Op Ar passwd
175 Supply a supplemental password required by a remote system for access
176 to resources once a login has been successfully completed.
177 If no argument is included, the user will be prompted for an account
178 password in a non-echoing input mode.
179 .It Ic append Ar local-file Op Ar remote-file
180 Append a local file to a file on the remote machine.
183 is left unspecified, the local file name is used in naming the
184 remote file after being altered by any
189 File transfer uses the current settings for
196 Set the file transfer
200 This is the default type.
202 Arrange that a bell be sounded after each file transfer
203 command is completed.
205 Set the file transfer
207 to support binary image transfer.
211 session with the remote server
214 An end of file will also terminate the session and exit.
216 Toggle remote computer file name case mapping during
221 is on (default is off), remote computer file names with all letters in
222 upper case are written in the local directory with the letters mapped
224 .It Ic \&cd Ar remote-directory
225 Change the working directory on the remote machine
227 .Ar remote-directory .
229 Change the remote machine working directory to the parent of the
230 current remote machine working directory.
231 .It Ic chmod Ar mode file-name
232 Change the permission modes of the file
240 session with the remote server, and
241 return to the command interpreter.
242 Any defined macros are erased.
244 Toggle carriage return stripping during
245 ascii type file retrieval.
246 Records are denoted by a carriage return/linefeed sequence
247 during ascii type file transfer.
250 is on (the default), carriage returns are stripped from this
251 sequence to conform with the
253 single linefeed record
257 remote systems may contain single linefeeds;
258 when an ascii type transfer is made, these linefeeds may be
259 distinguished from a record delimiter only when
262 .It Ic delete Ar remote-file
265 on the remote machine.
266 .It Ic debug Op Ar debug-value
267 Toggle debugging mode.
270 is specified, it is used to set the debugging level.
271 When debugging is on,
273 prints each command sent to the remote machine, preceded
276 .It Ic dir Op Ar remote-directory Op Ar local-file
277 Print a listing of the contents of a
278 directory on the remote machine.
279 The listing includes any system-dependent information that the server
280 chooses to include; for example, most
283 output from the command
289 is left unspecified, the current working directory is used.
290 If interactive prompting is on,
292 will prompt the user to verify that the last argument is indeed the
293 target local file for receiving
296 If no local file is specified, or if
300 the output is sent to the terminal.
302 As this command provides extra information which is system-dependent,
305 command instead if you only want a plain list of files.
310 Toggle command line editing, and context sensitive command and file
312 This is automatically enabled if input is from a terminal, and
317 commands on IPv4 FTP sessions.
318 Turning this option off may remedy problems with some
319 firewalls, e.g., IPFilter.
323 .It Ic ftp Ar host Op Ar port
326 .It Ic form Ar format
327 Set the file transfer
331 The default format is \*(Lqfile\*(Rq.
332 .It Ic get Ar remote-file Op Ar local-file
335 and store it on the local machine.
337 file name is not specified, it is given the same
338 name it has on the remote machine, subject to
339 alteration by the current
345 The current settings for
351 are used while transferring the file.
352 .It Ic gate Op Ar host Op Ar port
353 Toggle gate-ftp mode.
354 This will not be permitted if the gate-ftp server hasn't been set
355 (either explicitly by the user, or from the
357 environment variable).
361 then gate-ftp mode will be enabled, and the gate-ftp server will be set to
365 is also given, that will be used as the port to connect to on the
368 Toggle filename expansion for
373 If globbing is turned off with
375 the file name arguments
376 are taken literally and not expanded.
385 each remote file name is expanded
386 separately on the remote machine and the lists are not merged.
387 Expansion of a directory name is likely to be
388 different from expansion of the name of an ordinary file:
389 the exact result depends on the foreign operating system and ftp server,
390 and can be previewed by doing
391 .Ql mls remote-files \-
396 are not meant to transfer
397 entire directory subtrees of files.
401 archive of the subtree (in binary mode).
402 .It Ic hash Op Ar size
403 Toggle hash-sign (``#'') printing for each data block
405 The size of a data block defaults to 1024 bytes.
406 This can be changed by specifying
409 .It Ic help Op Ar command
410 Print an informative message about the meaning of
412 If no argument is given,
414 prints a list of the known commands.
415 .It Ic idle Op Ar seconds
416 Set the inactivity timer on the remote server to
421 is omitted, the current inactivity timer is printed.
422 .It Ic lcd Op Ar directory
423 Change the working directory on the local machine.
427 is specified, the user's home directory is used.
432 Print the working directory on the local machine.
433 .It Ic \&ls Op Ar remote-directory Op Ar local-file
436 .It Ic macdef Ar macro-name
438 Subsequent lines are stored as the macro
440 a null line (consecutive newline characters
442 carriage returns from the terminal) terminates macro input mode.
443 There is a limit of 16 macros and 4096 total characters in all
445 Macros remain defined until a
448 The macro processor interprets `$' and `\e' as special characters.
449 A `$' followed by a number (or numbers) is replaced by the
450 corresponding argument on the macro invocation command line.
451 A `$' followed by an `i' signals that macro processor that the
452 executing macro is to be looped.
453 On the first pass `$i' is
454 replaced by the first argument on the macro invocation command line,
455 on the second pass it is replaced by the second argument, and so on.
456 A `\e' followed by any character is replaced by that character.
457 Use the `\e' to prevent special treatment of the `$'.
458 .It Ic mdelete Op Ar remote-files
461 on the remote machine.
462 .It Ic mdir Ar remote-files local-file
465 except multiple remote files may be specified.
466 If interactive prompting is on,
468 will prompt the user to verify that the last argument is indeed the
469 target local file for receiving
472 .It Ic mget Ar remote-files
475 on the remote machine
478 for each file name thus produced.
481 for details on the filename expansion.
482 Resulting file names will then be processed according to
488 Files are transferred into the local working directory,
489 which can be changed with
491 new local directories can be created with
492 .Ql "\&! mkdir directory" .
493 .It Ic mkdir Ar directory-name
494 Make a directory on the remote machine.
495 .It Ic mls Ar remote-files local-file
498 except multiple remote files may be specified,
502 If interactive prompting is on,
504 will prompt the user to verify that the last argument is indeed the
505 target local file for receiving
508 .It Ic mode Op Ar mode-name
509 Set the file transfer
513 The default mode is \*(Lqstream\*(Rq mode.
514 .It Ic modtime Ar file-name
515 Show the last modification time of the file on the remote machine.
519 .It Ic mput Ar local-files
520 Expand wild cards in the list of local files given as arguments
523 for each file in the resulting list.
526 for details of filename expansion.
527 Resulting file names will then be processed according to
532 .It Ic msend Ar local-files
535 .It Ic newer Ar file-name
536 Get the file only if the modification time of the remote file is more
537 recent that the file on the current system.
539 exist on the current system, the remote file is considered
541 Otherwise, this command is identical to
543 .It Ic nlist Op Ar remote-directory Op Ar local-file
544 Print a list of the files in a
545 directory on the remote machine.
548 is left unspecified, the current working directory is used.
549 If interactive prompting is on,
551 will prompt the user to verify that the last argument is indeed the
552 target local file for receiving
555 If no local file is specified, or if
559 the output is sent to the terminal.
561 Note that this command only returns the filenames in the remote
562 directory. If you wish to see more information about the files (often
563 size, modification time, and so on),
567 .It Ic nmap Op Ar inpattern outpattern
568 Set or unset the filename mapping mechanism.
569 If no arguments are specified, the filename mapping mechanism is unset.
570 If arguments are specified, remote filenames are mapped during
574 commands issued without a specified remote target filename.
575 If arguments are specified, local filenames are mapped during
579 commands issued without a specified local target filename.
580 This command is useful when connecting to a
583 with different file naming conventions or practices.
584 The mapping follows the pattern set by
589 is a template for incoming filenames (which may have already been
590 processed according to the
595 Variable templating is accomplished by including the
596 sequences `$1', `$2', ..., `$9' in
598 Use `\\' to prevent this special treatment of the `$' character.
599 All other characters are treated literally, and are used to determine the
605 $1.$2 and the remote file name "mydata.data", $1 would have the value
606 "mydata", and $2 would have the value "data".
609 determines the resulting mapped filename.
610 The sequences `$1', `$2', ...., `$9' are replaced by any value resulting
614 The sequence `$0' is replace by the original filename.
615 Additionally, the sequence
616 .Ql Op Ar seq1 , Ar seq2
621 is not a null string; otherwise it is replaced by
623 For example, the command
625 .Bd -literal -offset indent -compact
626 nmap $1.$2.$3 [$1,$2].[$2,file]
630 the output filename "myfile.data" for input filenames "myfile.data" and
631 "myfile.data.old", "myfile.file" for the input filename "myfile", and
632 "myfile.myfile" for the input filename ".myfile".
633 Spaces may be included in
635 as in the example: `nmap $1 sed "s/ *$//" > $1' .
636 Use the `\e' character to prevent special treatment
637 of the `$','[',']' and `,' characters.
638 .It Ic ntrans Op Ar inchars Op Ar outchars
639 Set or unset the filename character translation mechanism.
640 If no arguments are specified, the filename character
641 translation mechanism is unset.
642 If arguments are specified, characters in
643 remote filenames are translated during
647 commands issued without a specified remote target filename.
648 If arguments are specified, characters in
649 local filenames are translated during
653 commands issued without a specified local target filename.
654 This command is useful when connecting to a
657 with different file naming conventions or practices.
658 Characters in a filename matching a character in
660 are replaced with the corresponding character in
662 If the character's position in
664 is longer than the length of
666 the character is deleted from the file name.
667 .It Ic open Ar host Op Ar port
668 Establish a connection to the specified
672 An optional port number may be supplied,
675 will attempt to contact an
680 option is on (default),
682 will also attempt to automatically log the user in to
689 and display with the program defined in
694 Toggle passive mode. If passive mode is turned on
695 (default is off), the ftp client will
698 command for all data connections instead of the usual
702 command requests that the remote server open a port for the data connection
703 and return the address of that port. The remote server listens on that
704 port and the client connects to it. When using the more traditional
706 command, the client listens on a port and sends that address to the remote
707 server, who connects back to it. Passive mode is useful when using
709 through a gateway router or host that controls the directionality of
711 (Note that though ftp servers are required to support the
713 command by RFC 1123, some do not.
714 Please note that if you are connecting to IPv6 ftp server,
724 The meaning is the same.)
726 Toggle preservation of modification times on retrieved files.
728 Toggle display of transfer progress bar.
729 The progress bar will be disabled for a transfer that has
733 or a command that starts with
736 .Sx FILE NAMING CONVENTIONS
737 for more information.
739 Toggle interactive prompting.
740 Interactive prompting
741 occurs during multiple file transfers to allow the
742 user to selectively retrieve or store files.
743 If prompting is turned off (default is on), any
747 will transfer all files, and any
749 will delete all files.
751 When prompting is on, the following commands are available at a prompt:
752 .Bl -tag -width 2n -offset indent
754 Do not transfer the file.
758 to the current file, and automatically answer
760 to any remaining files for the current command.
764 to the current file, and turn off prompt mode
770 Any other reponse will answer
773 .It Ic proxy Ar ftp-command
774 Execute an ftp command on a secondary control connection.
775 This command allows simultaneous connection to two remote ftp
776 servers for transferring files between the two servers.
781 to establish the secondary control connection.
782 Enter the command "proxy ?" to see other ftp commands executable on the
783 secondary connection.
784 The following commands behave differently when prefaced by
787 will not define new macros during the auto-login process,
789 will not erase existing macro definitions,
793 transfer files from the host on the primary control connection
794 to the host on the secondary control connection, and
799 transfer files from the host on the secondary control connection
800 to the host on the primary control connection.
801 Third party file transfers depend upon support of the ftp protocol
803 command by the server on the secondary control connection.
804 .It Ic put Ar local-file Op Ar remote-file
805 Store a local file on the remote machine.
808 is left unspecified, the local file name is used
809 after processing according to any
814 in naming the remote file.
815 File transfer uses the
823 Print the name of the current working directory on the remote
828 .It Ic quote Ar arg1 arg2 ...
829 The arguments specified are sent, verbatim, to the remote
832 .It Ic recv Ar remote-file Op Ar local-file
835 .It Ic reget Ar remote-file Op Ar local-file
836 Reget acts like get, except that if
843 a partially transferred copy of
846 is continued from the apparent point of failure.
848 is useful when transferring very large files over networks that
849 are prone to dropping connections.
850 .It Ic remotehelp Op Ar command-name
851 Request help from the remote
856 is specified it is supplied to the server as well.
857 .It Ic rstatus Op Ar file-name
858 With no arguments, show status of remote machine.
861 is specified, show status of
864 .It Ic rename Op Ar from Op Ar to
867 on the remote machine, to the file
871 This command re-synchronizes command/reply sequencing with the remote
873 Resynchronization may be necessary following a violation of the ftp protocol
874 by the remote server.
875 .It Ic restart Ar marker
876 Restart the immediately following
885 systems, marker is usually a byte
886 offset into the file.
888 Toggle data port range restrictions.
889 When not operating in passive mode, the
891 client program requests that the remote server open a connection back
892 to the client host on a separate data port. In previous versions, that
893 remote port fell in the range 1024..4999. However, most firewall setups
894 filter that range of TCP ports because other services reside there.
895 The default behavior now is for the client to request that the server
896 connect back to the client using the port range 49152..65535. Firewall
897 administrators can chose to allow TCP connections in that range, if they
898 deem it to not be a security risk.
899 .It Ic rmdir Ar directory-name
900 Delete a directory on the remote machine.
902 Toggle storing of files on the local system with unique filenames.
903 If a file already exists with a name equal to the target
908 command, a ".1" is appended to the name.
909 If the resulting name matches another existing file,
910 a ".2" is appended to the original name.
911 If this process continues up to ".99", an error
912 message is printed, and the transfer does not take place.
913 The generated unique filename will be reported.
916 will not affect local files generated from a shell command
918 The default value is off.
919 .It Ic send Ar local-file Op Ar remote-file
928 will attempt to use a
930 command when establishing
931 a connection for each data transfer.
934 commands can prevent delays
935 when performing multiple file transfers.
940 will use the default data port.
943 commands is disabled, no attempt will be made to use
945 commands for each data transfer.
949 implementations which do ignore
951 commands but, incorrectly, indicate they've been accepted.
952 .It Ic site Ar arg1 arg2 ...
953 The arguments specified are sent, verbatim, to the remote
958 .It Ic size Ar file-name
963 Show the current status of
965 .It Ic struct Op Ar struct-name
966 Set the file transfer
970 By default \*(Lqstream\*(Rq structure is used.
972 Toggle storing of files on remote machine under unique file names.
973 Remote ftp server must support ftp protocol
976 successful completion.
977 The remote server will report unique name.
978 Default value is off.
980 Show the type of operating system running on the remote machine.
982 Set the file transfer type to that needed to
987 Toggle packet tracing.
988 .It Ic type Op Ar type-name
989 Set the file transfer
993 If no type is specified, the current type
995 The default type is network
997 .It Ic umask Op Ar newmask
998 Set the default umask on the remote server to
1002 is omitted, the current umask is printed.
1004 .Ic user Ar user-name
1005 .Op Ar password Op Ar account
1007 Identify yourself to the remote
1012 is not specified and the server requires it,
1014 will prompt the user for it (after disabling local echo).
1017 field is not specified, and the
1020 requires it, the user will be prompted for it.
1023 field is specified, an account command will
1024 be relayed to the remote server after the login sequence
1025 is completed if the remote server did not require it
1029 is invoked with \*(Lqauto-login\*(Rq disabled, this
1030 process is done automatically on initial connection to
1035 Toggle verbose mode.
1036 In verbose mode, all responses from
1039 server are displayed to the user.
1041 if verbose is on, when a file transfer completes, statistics
1042 regarding the efficiency of the transfer are reported.
1045 .It Ic \&? Op Ar command
1050 Command arguments which have embedded spaces may be quoted with
1053 Commands which toggle settings can take an explicit
1057 argument to force the setting appropriately.
1067 signal whilst a transfer is in progress, the current transfer rate
1068 statistics will be written to the standard error output, in the
1069 same format as the standard completion message.
1070 .Sh AUTO-FETCHING FILES
1071 In addition to standard commands, this version of
1073 supports an auto-fetch feature.
1074 To enable auto-fetch, simply pass the list of hostnames/files
1075 on the command line.
1077 The following formats are valid syntax for an auto-fetch element:
1078 .Bl -tag -width "host:/file"
1082 .It ftp://[user:password@]host[:port]/file
1083 An ftp URL, retrieved using the ftp protocol if
1086 Otherwise, transfer using http via the proxy defined in
1092 isn't defined, login as
1096 .It http://host[:port]/file
1097 An HTTP URL, retrieved using the http protocol.
1100 is defined, it is used as a URL to an HTTP proxy server.
1103 If a classic format or a ftp URL format has a trailing
1107 will connect to the site and
1109 to the directory given as the path, and leave the user in interactive
1110 mode ready for further input.
1112 If successive auto-fetch ftp elements refer to the same host, then
1113 the connection is maintained between transfers, reducing overhead on
1114 connection creation and deletion.
1118 contains a glob character and globbing is enabled,
1121 then the equivalent of
1125 If the directory component of
1127 contains no globbing characters,
1128 it is stored in the current directory as the
1132 Otherwise, the remote name is used as the local name.
1133 .Sh ABORTING A FILE TRANSFER
1134 To abort a file transfer, use the terminal interrupt key
1136 Sending transfers will be immediately halted.
1137 Receiving transfers will be halted by sending a ftp protocol
1139 command to the remote server, and discarding any further data received.
1140 The speed at which this is accomplished depends upon the remote
1141 server's support for
1144 If the remote server does not support the
1148 prompt will not appear until the remote server has completed
1149 sending the requested file.
1151 The terminal interrupt key sequence will be ignored when
1153 has completed any local processing and is awaiting a reply
1154 from the remote server.
1155 A long delay in this mode may result from the ABOR processing described
1156 above, or from unexpected behavior by the remote server, including
1157 violations of the ftp protocol.
1158 If the delay results from unexpected remote server behavior, the local
1160 program must be killed by hand.
1161 .Sh FILE NAMING CONVENTIONS
1162 Files specified as arguments to
1164 commands are processed according to the following rules.
1173 (for writing) is used.
1175 If the first character of the file name is
1178 remainder of the argument is interpreted as a shell command.
1180 then forks a shell, using
1182 with the argument supplied, and reads (writes) from the stdin
1184 If the shell command includes spaces, the argument
1185 must be quoted; e.g.\&
1186 \*(Lq" ls -lt"\*(Rq.
1188 useful example of this mechanism is: \*(Lqdir \&|more\*(Rq.
1190 Failing the above checks, if
1193 local file names are expanded
1194 according to the rules used in the
1201 command expects a single local file (e.g.\&
1203 only the first filename generated by the "globbing" operation is used.
1209 commands with unspecified local file names, the local filename is
1210 the remote filename, which may be altered by a
1216 The resulting filename may then be altered if
1224 commands with unspecified remote file names, the remote filename is
1225 the local filename, which may be altered by a
1230 The resulting filename may then be altered by the remote server if
1234 .Sh FILE TRANSFER PARAMETERS
1235 The FTP specification specifies many parameters which may
1236 affect a file transfer.
1239 may be one of \*(Lqascii\*(Rq, \*(Lqimage\*(Rq (binary),
1240 \*(Lqebcdic\*(Rq and \*(Lqlocal byte size\*(Rq (for
1246 supports the ascii and image types of file transfer,
1247 plus local byte size 8 for
1252 supports only the default values for the remaining
1253 file transfer parameters:
1261 file contains login and initialization information
1262 used by the auto-login process.
1263 It resides in the user's home directory.
1264 The following tokens are recognized; they may be separated by spaces,
1266 .Bl -tag -width password
1267 .It Ic machine Ar name
1268 Identify a remote machine
1270 The auto-login process searches the
1274 token that matches the remote machine specified on the
1276 command line or as an
1279 Once a match is made, the subsequent
1281 tokens are processed,
1282 stopping when the end of file is reached or another
1286 token is encountered.
1294 There can be only one
1296 token, and it must be after all
1299 This is normally used as:
1301 .Dl default login anonymous password user@site
1303 thereby giving the user
1305 anonymous ftp login to
1306 machines not specified in
1308 This can be overridden
1311 flag to disable auto-login.
1312 .It Ic login Ar name
1313 Identify a user on the remote machine.
1314 If this token is present, the auto-login process will initiate
1315 a login using the specified
1317 .It Ic password Ar string
1319 If this token is present, the auto-login process will supply the
1320 specified string if the remote server requires a password as part
1321 of the login process.
1322 Note that if this token is present in the
1324 file for any user other
1328 will abort the auto-login process if the
1331 anyone besides the user.
1332 .It Ic account Ar string
1333 Supply an additional account password.
1334 If this token is present, the auto-login process will supply the
1335 specified string if the remote server requires an additional
1336 account password, or the auto-login process will initiate an
1338 command if it does not.
1339 .It Ic macdef Ar name
1341 This token functions like the
1345 A macro is defined with the specified name; its contents begin with the
1348 line and continue until a null line (consecutive new-line
1349 characters) is encountered.
1352 is defined, it is automatically executed as the last step in the
1355 .Sh COMMAND LINE EDITING
1357 supports interactive command line editing, via the
1360 It is enabled with the
1362 command, and is enabled by default if input is from a tty.
1363 Previous lines can be recalled and edited with the arrow keys,
1364 and other GNU Emacs-style editing keys may be used as well.
1368 library is configured with a
1372 for more information.
1374 An extra key binding is available to
1376 to provide context sensitive command and filename completion
1377 (including remote file completion).
1378 To use this, bind a key to the
1382 By default, this is bound to the TAB key.
1385 utilizes the following environment variables.
1386 .Bl -tag -width "FTP_PASSIVE_MODE"
1387 .It Ev FTP_PASSIVE_MODE
1388 If this variable is set to something else than
1391 will use passive mode by default.
1393 Host to use as gate-ftp server when
1396 .It Ev FTPSERVERPORT
1397 Port to use when connecting to gate-ftp server when
1400 Default is port returned by a
1405 For default location of a
1407 file, if one exists.
1415 URL of FTP proxy to use when making FTP URL requests
1416 (if not defined, use the standard ftp protocol).
1418 URL of HTTP proxy to use when making HTTP URL requests.
1421 .Xr getservbyname 3 ,
1430 commands are links to
1438 Various features such as command line editing, context sensitive
1439 command and file completion, dynamic progress bar, automatic
1440 fetching of files, ftp and http URLs, and modification time
1441 preservation were implemented in
1443 by Luke Mewburn, with assistance from Jason Thorpe.
1445 IPv6 support was added by WIDE/KAME Project.
1447 Correct execution of many commands depends upon proper behavior
1448 by the remote server.
1450 An error in the treatment of carriage returns
1453 ascii-mode transfer code
1455 This correction may result in incorrect transfers of binary files
1458 servers using the ascii type.
1459 Avoid this problem by using the binary image type.
1461 Proxying functionalities, such as
1463 may not work for IPv6 connection.