1.\" $OpenBSD: ftp.1,v 1.119 2020/02/11 18:41:39 deraadt Exp $ 2.\" $NetBSD: ftp.1,v 1.22 1997/08/18 10:20:22 lukem Exp $ 3.\" 4.\" Copyright (c) 1985, 1989, 1990, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 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. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 32.\" 33.Dd $Mdocdate: February 11 2020 $ 34.Dt FTP 1 35.Os 36.Sh NAME 37.Nm ftp 38.Nd Internet file transfer program 39.Sh SYNOPSIS 40.Nm ftp 41.Op Fl 46AadEegiMmnptVv 42.Op Fl D Ar title 43.Op Fl k Ar seconds 44.Op Fl P Ar port 45.Op Fl r Ar seconds 46.Op Fl s Ar sourceaddr 47.Op Ar host Op Ar port 48.Nm ftp 49.Op Fl C 50.Op Fl N Ar name 51.Op Fl o Ar output 52.Op Fl s Ar sourceaddr 53.Sm off 54.Pf ftp:// Op Ar user : password No @ 55.Ar host Op : Ar port 56.No / Ar file Op / 57.Sm on 58.Ar ... 59.Nm ftp 60.Op Fl C 61.Op Fl c Ar cookie 62.Op Fl N Ar name 63.Op Fl o Ar output 64.Op Fl S Ar ssl_options 65.Op Fl s Ar sourceaddr 66.Op Fl U Ar useragent 67.Op Fl w Ar seconds 68.Sm off 69.Pf http Oo s Oc :// 70.Op Ar user : password No @ 71.Ar host Op : Ar port 72.No / Ar file 73.Sm on 74.Ar ... 75.Nm ftp 76.Op Fl C 77.Op Fl N Ar name 78.Op Fl o Ar output 79.Op Fl s Ar sourceaddr 80.Pf file: Ar 81.Nm ftp 82.Op Fl C 83.Op Fl N Ar name 84.Op Fl o Ar output 85.Op Fl s Ar sourceaddr 86.Ar host : Ns / Ns Ar file Ns Op / 87.Ar ... 88.Sh DESCRIPTION 89.Nm 90is the user interface to the Internet standard File Transfer 91Protocol (FTP). 92The program allows a user to transfer files to and from a 93remote network site. 94.Pp 95The latter four usage formats will fetch a file using either the 96FTP, HTTP, or HTTPS protocols into the current directory. 97This is ideal for scripts. 98Refer to 99.Sx AUTO-FETCHING FILES 100below for more information. 101.Pp 102The options are as follows: 103.Bl -tag -width Ds 104.It Fl 4 105Forces 106.Nm 107to use IPv4 addresses only. 108.It Fl 6 109Forces 110.Nm 111to use IPv6 addresses only. 112.It Fl A 113Force active mode FTP. 114By default, 115.Nm 116will try to use passive mode FTP and fall back to active mode 117if passive is not supported by the server. 118This option causes 119.Nm 120to always use an active connection. 121It is only useful for connecting 122to very old servers that do not implement passive mode properly. 123.It Fl a 124Causes 125.Nm 126to bypass the normal login procedure and use an anonymous login instead. 127.It Fl C 128Continue a previously interrupted file transfer. 129.Nm 130will continue transferring from an offset equal to the length of 131.Ar file . 132.Pp 133Resuming HTTP(S) transfers are only supported 134if the remote server supports the 135.Dq Range 136header. 137.It Fl c Ar cookie 138Load a Netscape-like cookiejar file 139for HTTP and HTTPS transfers. 140With this option relevant cookies from the jar are sent with each HTTP(S) 141request. 142Setting the 143.Ev http_cookies 144environment variable has the same effect. 145If both the 146.Ev http_cookies 147environment variable is set and the 148.Fl c 149argument is given, the latter takes precedence. 150.It Fl D Ar title 151Specify a short 152.Ar title 153for the start of the progress bar. 154.It Fl d 155Enables debugging. 156.It Fl E 157Disables EPSV/EPRT command on IPv4 connections. 158.It Fl e 159Disables command line editing. 160Useful for Emacs ange-ftp. 161.It Fl g 162Disables file name globbing. 163.It Fl i 164Turns off interactive prompting during 165multiple file transfers. 166.It Fl k Ar seconds 167When greater than zero, 168sends a byte after each 169.Ar seconds 170period over the control connection during long transfers, 171so that incorrectly configured network equipment won't 172aggressively drop it. 173The FTP protocol supports a 174.Dv NOOP 175command that can be used for that purpose. 176This assumes the FTP server can deal with extra commands coming over 177the control connection during a transfer. 178Well-behaved servers queue those commands, and process them after the 179transfer. 180By default, 181.Nm 182will send a byte every 60 seconds. 183.It Fl M 184Causes 185.Nm 186to never display the progress meter in cases where it would do 187so by default. 188.It Fl m 189Causes 190.Nm 191to always display the progress meter in cases where it would not do 192so by default. 193.It Fl N Ar name 194Use this alternative name instead of 195.Nm 196in some error reports. 197.It Fl n 198Restrains 199.Nm 200from attempting 201.Dq auto-login 202upon initial connection. 203If auto-login is enabled, 204.Nm 205will check the 206.Pa .netrc 207file (see below) in the user's home directory for an entry describing 208an account on the remote machine. 209If no entry exists, 210.Nm 211will prompt for the remote machine login name (default is the user 212identity on the local machine) and, if necessary, prompt for a password 213and an account with which to log in. 214.It Fl o Ar output 215When fetching a single file or URL, save the contents in 216.Ar output . 217To make the contents go to stdout, 218use 219.Sq - 220for 221.Ar output . 222.It Fl P Ar port 223Sets the port number to 224.Ar port . 225.It Fl p 226Enable passive mode operation for use behind connection filtering firewalls. 227This option has been deprecated as 228.Nm 229now tries to use passive mode by default, falling back to active mode 230if the server does not support passive connections. 231.It Fl r Ar seconds 232Retry to connect if failed, pausing for number of 233.Ar seconds . 234.It Fl S Ar ssl_options 235SSL/TLS options to use with HTTPS transfers. 236The following settings are available: 237.Bl -tag -width Ds 238.It Cm cafile Ns = Ns Ar /path/to/cert.pem 239PEM encoded file containing CA certificates used for certificate 240validation. 241.It Cm capath Ns = Ns Ar /path/to/certs/ 242Directory containing PEM encoded CA certificates used for certificate 243validation. 244Such a directory can be prepared using the c_rehash script distributed with 245OpenSSL. 246.It Cm ciphers Ns = Ns Ar cipher_list 247Specify the list of ciphers that will be used by 248.Nm . 249See the 250.Xr openssl 1 251.Cm ciphers 252subcommand. 253.It Cm depth Ns = Ns Ar max_depth 254Maximum depth of the certificate chain allowed when performing 255validation. 256.It Cm do 257Perform server certificate validation. 258.It Cm dont 259Don't perform server certificate validation. 260.It Cm muststaple 261Require the server to present a valid OCSP stapling in the TLS handshake. 262.It Cm noverifytime 263Disable validation of certificate times and OCSP validation. 264.It Cm session Ns = Ns Ar /path/to/session 265Specify a file to use for TLS session data. 266If this file has a non-zero length, the session data will be read from this file 267and the client will attempt to resume the TLS session with the server. 268Upon completion of a successful TLS handshake this file will be updated 269with new session data, if available. 270This file will be created if it does not already exist. 271.El 272.Pp 273By default, server certificate validation is performed, and if it fails 274.Nm 275will abort. 276If no 277.Cm cafile 278or 279.Cm capath 280setting is provided, 281.Pa /etc/ssl/cert.pem 282will be used. 283.It Fl s Ar sourceaddr 284Set the source address for connections, which is useful on machines 285with multiple interfaces. 286.It Fl t 287Enables packet tracing. 288.It Fl U Ar useragent 289Set 290.Ar useragent 291as the User-Agent for HTTP(S) URL requests. 292If not specified, the default User-Agent is 293.Dq OpenBSD ftp . 294.It Fl V 295Disable verbose mode, overriding the default of enabled when input 296is from a terminal. 297.It Fl v 298Enable verbose mode. 299This is the default if input is from a terminal. 300Forces 301.Nm 302to show all responses from the remote server, as well 303as report on data transfer statistics. 304.It Fl w Ar seconds 305For URL format connections to HTTP/HTTPS servers, abort a 306slow connection after 307.Ar seconds . 308.El 309.Pp 310The host with which 311.Nm 312is to communicate may be specified on the command line. 313If this is done, 314.Nm 315will immediately attempt to establish a connection to an 316FTP server on that host; otherwise, 317.Nm 318will enter its command interpreter and await instructions 319from the user. 320When 321.Nm 322is awaiting commands, the prompt 323.Dq ftp\*(Gt 324is provided to the user. 325The following commands are recognized 326by 327.Nm : 328.Bl -tag -width Ds 329.It Ic \&! Oo Ar command 330.Op Ar arg ... 331.Oc 332Invoke an interactive shell on the local machine. 333If there are arguments, the first is taken to be a command to execute 334directly, with the rest of the arguments as its arguments. 335.It Ic \&$ Ar macro-name Op Ar arg ... 336Execute the macro 337.Ar macro-name 338that was defined with the 339.Ic macdef 340command. 341Arguments are passed to the macro unglobbed. 342.It Ic \&? Op Ar command 343A synonym for 344.Ic help . 345.It Ic account Op Ar password 346Supply a supplemental password required by a remote system for access 347to resources once a login has been successfully completed. 348If no argument is included, the user will be prompted for an account 349password in a non-echoing input mode. 350.It Ic append Ar local-file Op Ar remote-file 351Append a local file to a file on the remote machine. 352If 353.Ar remote-file 354is left unspecified, the local file name is used in naming the 355remote file after being altered by any 356.Ic ntrans 357or 358.Ic nmap 359setting. 360File transfer uses the current settings for 361.Ic type , 362.Ic format , 363.Ic mode , 364and 365.Ic structure . 366.It Ic ascii 367Set the file transfer 368.Ic type 369to network ASCII. 370.It Ic bell Op Ic on | off 371Arrange that a bell be sounded after each file transfer 372command is completed. 373.It Ic binary 374Set the file transfer 375.Ic type 376to support binary image transfer. 377This is the default type. 378.It Ic bye 379Terminate the FTP session with the remote server and exit 380.Nm . 381An end-of-file will also terminate the session and exit. 382.It Ic case Op Ic on | off 383Toggle remote computer file name case mapping during 384.Ic mget 385commands. 386When 387.Ic case 388is on (default is off), remote computer file names with all letters in 389upper case are written in the local directory with the letters mapped 390to lower case. 391.It Ic cd Ar remote-directory 392Change the working directory on the remote machine 393to 394.Ar remote-directory . 395.It Ic cdup 396Change the remote machine working directory to the parent of the 397current remote machine working directory. 398.It Ic chmod Ar mode file 399Change the permission modes of 400.Ar file 401on the remote 402system to 403.Ar mode . 404.It Ic close 405Terminate the FTP session with the remote server and 406return to the command interpreter. 407Any defined macros are erased. 408.It Ic cr Op Ic on | off 409Toggle carriage return stripping during 410ASCII type file retrieval. 411Records are denoted by a carriage return/linefeed sequence 412during ASCII type file transfer. 413When 414.Ic cr 415is on (the default), carriage returns are stripped from this 416sequence to conform with the 417.Ux 418single linefeed record delimiter. 419Records on non-UNIX 420remote systems may contain single linefeeds; 421when an ASCII type transfer is made, these linefeeds may be 422distinguished from a record delimiter only when 423.Ic cr 424is off. 425.It Ic debug Oo Ic on | off | 426.Ar debuglevel 427.Oc 428Toggle debugging mode. 429If an optional 430.Ar debuglevel 431is specified, it is used to set the debugging level. 432When debugging is on, 433.Nm 434prints each command sent to the remote machine, 435preceded by the string 436.Ql --\*(Gt . 437.It Ic delete Ar remote-file 438Delete the file 439.Ar remote-file 440on the remote machine. 441.It Ic dir Op Ar remote-directory Op Ar local-file 442A synonym for 443.Ic ls . 444.It Ic disconnect 445A synonym for 446.Ic close . 447.It Ic edit Op Ic on | off 448Toggle command line editing, and context sensitive command and file 449completion. 450This is automatically enabled if input is from a terminal, and 451disabled otherwise. 452.It Ic epsv4 Op Ic on | off 453Toggle use of EPSV/EPRT command on IPv4 connection. 454.It Ic exit 455A synonym for 456.Ic bye . 457.It Ic form Ar format 458Set the file transfer 459.Ic form 460to 461.Ar format . 462The default format is 463.Dq file . 464.It Ic ftp Ar host Op Ar port 465A synonym for 466.Ic open . 467.It Ic gate Oo Ic on | off | 468.Ar host Op Ar port 469.Oc 470Toggle gate-ftp mode. 471This will not be permitted if the gate-ftp server hasn't been set 472(either explicitly by the user, or from the 473.Ev FTPSERVER 474environment variable). 475If 476.Ar host 477is given, 478then gate-ftp mode will be enabled, and the gate-ftp server will be set to 479.Ar host . 480If 481.Ar port 482is also given, that will be used as the port to connect to on the 483gate-ftp server. 484.It Ic get Ar remote-file Op Ar local-file 485Retrieve the 486.Ar remote-file 487and store it on the local machine. 488If the local 489file name is not specified, it is given the same 490name it has on the remote machine, subject to 491alteration by the current 492.Ic case , 493.Ic ntrans , 494and 495.Ic nmap 496settings. 497The current settings for 498.Ic type , 499.Ic form , 500.Ic mode , 501and 502.Ic structure 503are used while transferring the file. 504.It Ic glob Op Ic on | off 505Toggle filename expansion for 506.Ic mdelete , 507.Ic mget 508and 509.Ic mput . 510If globbing is turned off with 511.Ic glob , 512the file name arguments 513are taken literally and not expanded. 514Globbing for 515.Ic mput 516is done as in 517.Xr csh 1 . 518For 519.Ic mdelete 520and 521.Ic mget , 522each remote file name is expanded 523separately on the remote machine and the lists are not merged. 524Expansion of a directory name is likely to be 525different from expansion of the name of an ordinary file: 526the exact result depends on the foreign operating system and FTP server, 527and can be previewed by doing 528.Dq mls remote-files - . 529Note: 530.Ic mget 531and 532.Ic mput 533are not meant to transfer 534entire directory subtrees of files. 535That can be done by 536transferring a 537.Xr tar 1 538archive of the subtree (in binary mode). 539.It Ic hash Oo Ic on | off | 540.Ar size 541.Oc 542Toggle hash mark 543.Pq Ql # 544printing for each data block transferred. 545The size of a data block defaults to 1024 bytes. 546This can be changed by specifying 547.Ar size 548in bytes. 549.It Ic help Op Ar command 550Print an informative message about the meaning of 551.Ar command . 552If no argument is given, 553.Nm 554prints a list of the known commands. 555.It Ic idle Op Ar seconds 556Set the inactivity timer on the remote server to 557.Ar seconds 558seconds. 559If 560.Ar seconds 561is omitted, the current inactivity timer is printed. 562.It Ic lcd Op Ar local-directory 563Change the working directory on the local machine. 564If 565no 566.Ar local-directory 567is specified, the user's home directory is used. 568.It Ic less Ar file 569A synonym for 570.Ic page . 571.It Ic lpwd 572Print the working directory on the local machine. 573.It Ic ls Op Ar remote-directory Op Ar local-file 574Print a listing of the contents of a directory on the remote machine. 575The listing includes any system-dependent information that the server 576chooses to include; for example, most 577.Ux 578systems will produce output from the command 579.Ql ls -l . 580If 581.Ar remote-directory 582is left unspecified, the current working directory is used. 583If interactive prompting is on, 584.Nm 585will prompt the user to verify that the last argument is indeed the 586target local file for receiving 587.Ic ls 588output. 589If no local file is specified, or if 590.Ar local-file 591is 592.Sq - , 593the output is sent to the terminal. 594.It Ic macdef Ar macro-name 595Define a macro. 596Subsequent lines are stored as the macro 597.Ar macro-name ; 598a null line (consecutive newline characters 599in a file or 600carriage returns from the terminal) terminates macro input mode. 601There is a limit of 16 macros and 4096 total characters in all 602defined macros. 603Macro names can be a maximum of 8 characters. 604Macros are only applicable to the current session they are 605defined in (or if defined outside a session, to the session 606invoked with the next 607.Ic open 608command), and remain defined until a 609.Ic close 610command is executed. 611To invoke a macro, 612use the 613.Ic $ 614command (see above). 615.Pp 616The macro processor interprets 617.Ql $ 618and 619.Ql \e 620as special characters. 621A 622.Ql $ 623followed by a number (or numbers) is replaced by the 624corresponding argument on the macro invocation command line. 625A 626.Ql $ 627followed by an 628.Sq i 629tells the macro processor that the 630executing macro is to be looped. 631On the first pass 632.Ql $i 633is 634replaced by the first argument on the macro invocation command line, 635on the second pass it is replaced by the second argument, and so on. 636A 637.Ql \e 638followed by any character is replaced by that character. 639Use the 640.Ql \e 641to prevent special treatment of the 642.Ql $ . 643.It Ic mdelete Op Ar remote-files 644Delete the 645.Ar remote-files 646on the remote machine. 647.It Ic mdir Ar remote-files local-file 648A synonym for 649.Ic mls . 650.It Xo Ic mget 651.Op Fl cnr 652.Op Fl d Ar depth 653.Ar remote-files 654.Xc 655Expand the 656.Ar remote-files 657on the remote machine 658and do a 659.Ic get 660for each file name thus produced. 661See 662.Ic glob 663for details on the filename expansion. 664Resulting file names will then be processed according to 665.Ic case , 666.Ic ntrans , 667and 668.Ic nmap 669settings. 670Files are transferred into the local working directory, 671which can be changed with 672.Ql lcd directory ; 673new local directories can be created with 674.Ql "\&! mkdir directory" . 675.Pp 676The options are as follows: 677.Bl -tag -width Ds 678.It Fl c 679Use 680.Ic reget 681instead of 682.Ic get . 683.It Fl d Ar depth 684Specify the maximum recursion level 685.Ar depth . 686The default is 0, which means unlimited. 687.It Fl n 688Use 689.Ic newer 690instead of 691.Ic get . 692.It Fl r 693Recursively descend the directory tree, transferring all files and 694directories. 695.El 696.It Ic mkdir Ar directory-name 697Make a directory on the remote machine. 698.It Ic mls Ar remote-files local-file 699Like 700.Ic ls , 701except multiple remote files may be specified, 702and the 703.Ar local-file 704must be specified. 705If interactive prompting is on, 706.Nm 707will prompt the user to verify that the last argument is indeed the 708target local file for receiving 709.Ic mls 710output. 711.It Ic mode Op Ar mode-name 712Set the file transfer 713.Ic mode 714to 715.Ar mode-name . 716The default mode is 717.Dq stream 718mode. 719.It Ic modtime Ar file 720Show the last modification time of 721.Ar file 722on the remote machine. 723.It Ic more Ar file 724A synonym for 725.Ic page . 726.It Xo Ic mput 727.Op Fl cr 728.Op Fl d Ar depth 729.Ar local-files 730.Xc 731Expand wild cards in the list of local files given as arguments 732and do a 733.Ic put 734for each file in the resulting list. 735See 736.Ic glob 737for details of filename expansion. 738Resulting file names will then be processed according to 739.Ic ntrans 740and 741.Ic nmap 742settings. 743.Pp 744If the 745.Fl c 746flag is specified then 747The options are as follows: 748.Bl -tag -width Ds 749.It Fl c 750Use 751.Ic reput 752instead of 753.Ic put . 754.It Fl d Ar depth 755Specify the maximum recursion level 756.Ar depth . 757The default is 0, which means unlimited. 758.It Fl r 759Recursively descend the directory tree, transferring all files and 760directories. 761.El 762.It Xo Ic msend 763.Op Fl c 764.Ar local-files 765.Xc 766A synonym for 767.Ic mput . 768.It Ic newer Ar remote-file Op Ar local-file 769Get the file only if the modification time of the remote file is more 770recent than the file on the current system. 771If the file does not 772exist on the current system, the remote file is considered 773.Ic newer . 774Otherwise, this command is identical to 775.Ar get . 776.It Ic nlist Op Ar remote-directory Op Ar local-file 777Print a list of the files in a 778directory on the remote machine. 779If 780.Ar remote-directory 781is left unspecified, the current working directory is used. 782If interactive prompting is on, 783.Nm 784will prompt the user to verify that the last argument is indeed the 785target local file for receiving 786.Ic nlist 787output. 788If no local file is specified, or if 789.Ar local-file 790is 791.Sq - , 792the output is sent to the terminal. 793Note that on some servers, the 794.Ic nlist 795command will only return information on normal files (not directories 796or special files). 797.It Ic nmap Op Ar inpattern outpattern 798Set or unset the filename mapping mechanism. 799If no arguments are specified, the filename mapping mechanism is unset. 800If arguments are specified, remote filenames are mapped during 801.Ic mput 802commands and 803.Ic put 804commands issued without a specified remote target filename. 805If arguments are specified, local filenames are mapped during 806.Ic mget 807commands and 808.Ic get 809commands issued without a specified local target filename. 810This command is useful when connecting to a non-UNIX remote computer 811with different file naming conventions or practices. 812.Pp 813The mapping follows the pattern set by 814.Ar inpattern 815and 816.Ar outpattern . 817.Ar inpattern 818is a template for incoming filenames (which may have already been 819processed according to the 820.Ic ntrans 821and 822.Ic case 823settings). 824Variable templating is accomplished by including the 825sequences 826.Ql $1 , 827.Ql $2 , 828\&..., 829.Ql $9 830in 831.Ar inpattern . 832Use 833.Ql \e 834to prevent this special treatment of the 835.Ql $ 836character. 837All other characters are treated literally, and are used to determine the 838.Ic nmap 839.Ar inpattern 840variable values. 841.Pp 842For example, given 843.Ar inpattern 844$1.$2 and the remote file name "mydata.data", $1 would have the value 845"mydata", and $2 would have the value "data". 846The 847.Ar outpattern 848determines the resulting mapped filename. 849The sequences 850.Ql $1 , 851.Ql $2 , 852\&..., 853.Ql $9 854are replaced by any value resulting from the 855.Ar inpattern 856template. 857The sequence 858.Ql $0 859is replaced by the original filename. 860Additionally, the sequence 861.Sq Op Ar seq1 , Ar seq2 862is replaced by 863.Ar seq1 864if 865.Ar seq1 866is not a null string; otherwise it is replaced by 867.Ar seq2 . 868For example: 869.Pp 870.Dl nmap $1.$2.$3 [$1,$2].[$2,file] 871.Pp 872This command would yield the output filename 873.Pa myfile.data 874for input filenames 875.Pa myfile.data 876and 877.Pa myfile.data.old ; 878.Pa myfile.file 879for the input filename 880.Pa myfile ; 881and 882.Pa myfile.myfile 883for the input filename 884.Pa .myfile . 885Spaces may be included in 886.Ar outpattern 887by quoting them, 888as in the following example: 889.Bd -literal -offset indent 890nmap $1.$2 "$1 $2" 891.Ed 892.Pp 893Use the 894.Ql \e 895character to prevent special treatment 896of the 897.Ql $ , 898.Ql \&[ , 899.Ql \&] , 900and 901.Ql \&, 902characters. 903.It Ic ntrans Op Ar inchars Op Ar outchars 904Set or unset the filename character translation mechanism. 905If no arguments are specified, the filename character 906translation mechanism is unset. 907If arguments are specified, characters in 908remote filenames are translated during 909.Ic mput 910commands and 911.Ic put 912commands issued without a specified remote target filename. 913If arguments are specified, characters in 914local filenames are translated during 915.Ic mget 916commands and 917.Ic get 918commands issued without a specified local target filename. 919This command is useful when connecting to a non-UNIX remote computer 920with different file naming conventions or practices. 921Characters in a filename matching a character in 922.Ar inchars 923are replaced with the corresponding character in 924.Ar outchars . 925If the character's position in 926.Ar inchars 927is longer than the length of 928.Ar outchars , 929the character is deleted from the file name. 930.It Ic open Ar host Op Ar port 931Establish a connection to the specified 932.Ar host 933FTP server. 934An optional port number may be supplied, 935in which case 936.Nm 937will attempt to contact an FTP server at that port. 938If the 939.Ic auto-login 940option is on (default), 941.Nm 942will also attempt to automatically log the user in to 943the FTP server (see below). 944.It Ic page Ar file 945Retrieve 946.Ic file 947and display with the program defined in 948.Ev PAGER 949(defaulting to 950.Xr more 1 951if 952.Ev PAGER 953is null or not defined). 954.It Ic passive Op Ic on | off 955Toggle passive mode. 956If passive mode is turned on (default is on), 957.Nm 958will send a 959.Dv EPSV 960command for all data connections instead of the usual 961.Dv PORT 962command. 963The 964.Dv PASV 965command requests that the remote server open a port for the data connection 966and return the address of that port. 967The remote server listens on that port and the client connects to it. 968When using the more traditional 969.Dv PORT 970command, the client listens on a port and sends that address to the remote 971server, who connects back to it. 972Passive mode is useful when using 973.Nm 974through a gateway router or host that controls the directionality of 975traffic. 976(Note that though FTP servers are required to support the 977.Dv PASV 978command by RFC 1123, some do not.) 979.It Ic preserve Op Ic on | off 980Toggle preservation of modification times on retrieved files. 981.It Ic progress Op Ic on | off 982Toggle display of transfer progress bar. 983The progress bar will be disabled for a transfer that has 984.Ar local-file 985as 986.Sq - 987or a command that starts with 988.Sq \&| . 989Refer to 990.Sx FILE NAMING CONVENTIONS 991for more information. 992.It Ic prompt Op Ic on | off 993Toggle interactive prompting. 994Interactive prompting 995occurs during multiple file transfers to allow the 996user to selectively retrieve or store files. 997If prompting is turned off (default is on), any 998.Ic mget 999or 1000.Ic mput 1001will transfer all files, and any 1002.Ic mdelete 1003will delete all files. 1004.Pp 1005When prompting is on, the following commands are available at a prompt: 1006.Bl -tag -width 2n -offset indent 1007.It Ic ?\& 1008Print help message. 1009.It Ic a 1010Answer 1011.Dq yes 1012to the current file and automatically answer 1013.Dq yes 1014to any remaining files for the current command. 1015.It Ic n 1016Do not transfer the file. 1017.It Ic p 1018Answer 1019.Dq yes 1020to the current file and turn off prompt mode 1021(as if 1022.Dq prompt off 1023had been given). 1024.It Ic q 1025Answer 1026.Dq no 1027to the current file and automatically answer 1028.Dq no 1029to any remaining files for the current command. 1030.It Ic y 1031Transfer the file. 1032.El 1033.It Ic proxy Ar command 1034Execute an FTP command on a secondary control connection. 1035This command allows simultaneous connection to two remote FTP 1036servers for transferring files between the two servers. 1037The first 1038.Ic proxy 1039command should be an 1040.Ic open , 1041to establish the secondary control connection. 1042Enter the command 1043.Ic proxy ?\& 1044to see other FTP commands executable on the 1045secondary connection. 1046The following commands behave differently when prefaced by 1047.Ic proxy : 1048.Ic open 1049will not define new macros during the auto-login process; 1050.Ic close 1051will not erase existing macro definitions; 1052.Ic get 1053and 1054.Ic mget 1055transfer files from the host on the primary control connection 1056to the host on the secondary control connection; and 1057.Ic put , 1058.Ic mput , 1059and 1060.Ic append 1061transfer files from the host on the secondary control connection 1062to the host on the primary control connection. 1063Third party file transfers depend upon support of the FTP protocol 1064.Dv PASV 1065command by the server on the secondary control connection. 1066.It Ic put Ar local-file Op Ar remote-file 1067Store a local file on the remote machine. 1068If 1069.Ar remote-file 1070is left unspecified, the local file name is used 1071after processing according to any 1072.Ic ntrans 1073or 1074.Ic nmap 1075settings 1076in naming the remote file. 1077File transfer uses the 1078current settings for 1079.Ic type , 1080.Ic format , 1081.Ic mode , 1082and 1083.Ic structure . 1084.It Ic pwd 1085Print the name of the current working directory on the remote 1086machine. 1087.It Ic quit 1088A synonym for 1089.Ic bye . 1090.It Ic quote Ar arg ... 1091The arguments specified are sent, verbatim, to the remote FTP server. 1092.It Ic recv Ar remote-file Op Ar local-file 1093A synonym for 1094.Ic get . 1095.It Ic reget Ar remote-file Op Ar local-file 1096Reget acts like get, except that if 1097.Ar local-file 1098exists and is 1099smaller than 1100.Ar remote-file , 1101.Ar local-file 1102is presumed to be 1103a partially transferred copy of 1104.Ar remote-file 1105and the transfer 1106is continued from the apparent point of failure. 1107This command 1108is useful when transferring very large files over networks that 1109are prone to dropping connections. 1110.It Ic rename Ar from-name to-name 1111Rename the file 1112.Ar from-name 1113on the remote machine to the file 1114.Ar to-name . 1115.It Ic reput Ar local-file Op Ar remote-file 1116Reput acts like put, except that if 1117.Ar remote-file 1118exists and is 1119smaller than 1120.Ar local-file , 1121.Ar remote-file 1122is presumed to be 1123a partially transferred copy of 1124.Ar local-file 1125and the transfer 1126is continued from the apparent point of failure. 1127This command 1128is useful when transferring very large files over networks that 1129are prone to dropping connections. 1130.It Ic reset 1131Clear reply queue. 1132This command re-synchronizes command/reply sequencing with the remote 1133FTP server. 1134Resynchronization may be necessary following a violation of the FTP protocol 1135by the remote server. 1136.It Ic restart Ar marker 1137Restart the immediately following 1138.Ic get 1139or 1140.Ic put 1141at the 1142indicated 1143.Ar marker . 1144On 1145.Ux 1146systems, 1147.Ar marker 1148is usually a byte 1149offset into the file. 1150.It Ic rhelp Op Ar command-name 1151Request help from the remote FTP server. 1152If a 1153.Ar command-name 1154is specified, it is supplied to the server as well. 1155.It Ic rmdir Ar directory-name 1156Delete a directory on the remote machine. 1157.It Ic rstatus Op Ar file 1158With no arguments, show status of remote machine. 1159If 1160.Ar file 1161is specified, show status of 1162.Ar file 1163on remote machine. 1164.It Ic runique Op Ic on | off 1165Toggle storing of files on the local system with unique filenames. 1166If a file already exists with a name equal to the target 1167local filename for a 1168.Ic get 1169or 1170.Ic mget 1171command, a 1172.Dq .1 1173is appended to the name. 1174If the resulting name matches another existing file, 1175a 1176.Dq .2 1177is appended to the original name. 1178If this process continues up to 1179.Dq .99 , 1180an error message is printed, and the transfer does not take place. 1181The generated unique filename will be reported. 1182Note that 1183.Ic runique 1184will not affect local files generated from a shell command 1185(see below). 1186The default value is off. 1187.It Ic send Ar local-file Op Ar remote-file 1188A synonym for 1189.Ic put . 1190.It Ic sendport Op Ic on | off 1191Toggle the use of 1192.Dv PORT 1193commands. 1194By default, 1195.Nm 1196will attempt to use a 1197.Dv PORT 1198command when establishing 1199a connection for each data transfer. 1200The use of 1201.Dv PORT 1202commands can prevent delays 1203when performing multiple file transfers. 1204If the 1205.Dv PORT 1206command fails, 1207.Nm 1208will use the default data port. 1209When the use of 1210.Dv PORT 1211commands is disabled, no attempt will be made to use 1212.Dv PORT 1213commands for each data transfer. 1214This is useful for certain FTP implementations which do ignore 1215.Dv PORT 1216commands but, incorrectly, indicate they've been accepted. 1217.It Ic site Ar arg ... 1218The arguments specified are sent, verbatim, to the remote FTP server as a 1219.Dv SITE 1220command. 1221.It Ic size Ar file 1222Return size of 1223.Ar file 1224on remote machine. 1225.It Ic status 1226Show the current status of 1227.Nm . 1228.\" .It Ic struct Op Ar struct-name 1229.\" Set the file transfer 1230.\" .Ar structure 1231.\" to 1232.\" .Ar struct-name . 1233.\" By default, 1234.\" .Dq file 1235.\" structure is used. 1236.It Ic sunique Op Ic on | off 1237Toggle storing of files on remote machine under unique file names. 1238The remote FTP server must support the FTP protocol 1239.Dv STOU 1240command for 1241successful completion. 1242The remote server will report the unique name. 1243Default value is off. 1244.It Ic system 1245Show the type of operating system running on the remote machine. 1246.It Ic trace Op Ic on | off 1247Toggle packet tracing. 1248.It Ic type Op Ar type-name 1249Set the file transfer 1250.Ic type 1251to 1252.Ar type-name . 1253If no type is specified, the current type 1254is printed. 1255The default type is 1256.Dq binary . 1257.It Ic umask Op Ar newmask 1258Set the default umask on the remote server to 1259.Ar newmask . 1260If 1261.Ar newmask 1262is omitted, the current umask is printed. 1263.It Xo 1264.Ic user Ar username 1265.Op Ar password Op Ar account 1266.Xc 1267Identify yourself to the remote FTP server. 1268If the 1269.Ar password 1270is not specified and the server requires it, 1271.Nm 1272will prompt the user for it (after disabling local echo). 1273If an 1274.Ar account 1275field is not specified, and the FTP server requires it, 1276the user will be prompted for it. 1277If an 1278.Ar account 1279field is specified, an account command will 1280be relayed to the remote server after the login sequence 1281is completed if the remote server did not require it 1282for logging in. 1283Unless 1284.Nm 1285is invoked with 1286.Dq auto-login 1287disabled, this process is done automatically on initial connection to the 1288FTP server. 1289.It Ic verbose Op Ic on | off 1290Toggle verbose mode. 1291In verbose mode, all responses from 1292the FTP server are displayed to the user. 1293In addition, 1294if verbose is on, when a file transfer completes, statistics 1295regarding the efficiency of the transfer are reported. 1296By default, 1297verbose is on. 1298.El 1299.Pp 1300Command arguments which have embedded spaces may be quoted with 1301quote 1302.Pq Ql \&" 1303marks. 1304.Pp 1305Commands which toggle settings can take an explicit 1306.Ic on 1307or 1308.Ic off 1309argument to force the setting appropriately. 1310.Pp 1311If 1312.Nm 1313receives a 1314.Dv SIGINFO 1315(see the 1316.Dq status 1317argument of 1318.Xr stty 1 ) 1319signal whilst a transfer is in progress, the current transfer rate 1320statistics will be written to the standard error output, in the 1321same format as the standard completion message. 1322.Sh AUTO-FETCHING FILES 1323In addition to standard commands, this version of 1324.Nm 1325supports an auto-fetch feature. 1326To enable auto-fetch, simply pass the list of hostnames/files 1327on the command line. 1328.Pp 1329The following formats are valid syntax for an auto-fetch element: 1330.Bl -tag -width Ds 1331.It Ar host : Ns / Ns Ar file Ns Op / 1332.Dq Classic 1333.Nm 1334format. 1335.Sm off 1336.It Xo 1337.Pf ftp:// Op Ar user : password No @ 1338.Ar host Op : Ar port 1339.No / Ar file Op / 1340.Xc 1341.Sm on 1342An FTP URL, retrieved using the FTP protocol if 1343.Ev ftp_proxy 1344isn't defined. 1345Otherwise, transfer using HTTP via the proxy defined in 1346.Ev ftp_proxy . 1347If a 1348.Ar user 1349and 1350.Ar password 1351are given and 1352.Ev ftp_proxy 1353isn't defined, 1354log in as 1355.Ar user 1356with a password of 1357.Ar password . 1358.Sm off 1359.It Xo 1360.Pf http:// Op Ar user : password No @ 1361.Ar host Op : Ar port 1362.No / Ar file 1363.Xc 1364.Sm on 1365An HTTP URL, retrieved using the HTTP protocol. 1366If 1367.Ev http_proxy 1368is defined, it is used as a URL to an HTTP proxy server. 1369If a 1370.Ar user 1371and 1372.Ar password 1373are given and 1374.Ev http_proxy 1375isn't defined, 1376log in as 1377.Ar user 1378with a password of 1379.Ar password 1380using Basic authentication. 1381.Sm off 1382.It Xo 1383.Pf https:// Op Ar user : password No @ 1384.Ar host Op : Ar port 1385.No / Ar file 1386.Xc 1387.Sm on 1388An HTTPS URL, retrieved using the HTTPS protocol. 1389If 1390.Ev http_proxy 1391is defined, this HTTPS proxy server will be used to fetch the 1392file using the CONNECT method. 1393If a 1394.Ar user 1395and 1396.Ar password 1397are given and 1398.Ev http_proxy 1399isn't defined, 1400log in as 1401.Ar user 1402with a password of 1403.Ar password 1404using Basic authentication. 1405.It Pf file: Ar file 1406.Ar file 1407is retrieved from a mounted file system. 1408.El 1409.Pp 1410If a classic format or an FTP URL format has a trailing 1411.Sq / , 1412then 1413.Nm 1414will connect to the site and 1415.Ic cd 1416to the directory given as the path, and leave the user in interactive 1417mode ready for further input. 1418.Pp 1419If 1420.Ar file 1421contains a glob character and globbing is enabled 1422(see 1423.Ic glob ) , 1424then the equivalent of 1425.Ic mget Ar file 1426is performed. 1427.Pp 1428If no 1429.Fl o 1430option is specified, and 1431the directory component of 1432.Ar file 1433contains no globbing characters, 1434then 1435it is stored in the current directory as the 1436.Xr basename 1 1437of 1438.Ar file . 1439If 1440.Fl o Ar output 1441is specified, then 1442.Ar file 1443is stored as 1444.Ar output . 1445Otherwise, the remote name is used as the local name. 1446.Sh ABORTING A FILE TRANSFER 1447To abort a file transfer, use the terminal interrupt key 1448(usually Ctrl-C). 1449Sending transfers will be immediately halted. 1450Receiving transfers will be halted by sending an FTP protocol 1451.Dv ABOR 1452command to the remote server, and discarding any further data received. 1453The speed at which this is accomplished depends upon the remote 1454server's support for 1455.Dv ABOR 1456processing. 1457If the remote server does not support the 1458.Dv ABOR 1459command, an 1460.Ql ftp\*(Gt 1461prompt will not appear until the remote server has completed 1462sending the requested file. 1463.Pp 1464The terminal interrupt key sequence will be ignored when 1465.Nm 1466has completed any local processing and is awaiting a reply 1467from the remote server. 1468A long delay in this mode may result from the ABOR processing described 1469above, or from unexpected behavior by the remote server, including 1470violations of the FTP protocol. 1471If the delay results from unexpected remote server behavior, the local 1472.Nm 1473program must be killed by hand. 1474.Sh FILE NAMING CONVENTIONS 1475Files specified as arguments to 1476.Nm 1477commands are processed according to the following rules. 1478.Bl -enum 1479.It 1480If 1481.Sq - 1482is specified as a local file name, the standard input (for reading) 1483or standard output (for writing) 1484is used. 1485.It 1486If the first character of a local file name is 1487.Sq \&| , 1488the 1489remainder of the argument is interpreted as a shell command. 1490.Nm 1491then forks a shell, using 1492.Xr popen 3 1493with the argument supplied, and reads (writes) from the standard output 1494(standard input). 1495If the shell command includes spaces, the argument 1496must be quoted; e.g., 1497.Qq ls -lt . 1498A particularly 1499useful example of this mechanism is: 1500.Qq ls \&. |more . 1501.It 1502Failing the above checks, if 1503.Dq globbing 1504is enabled, 1505local file names are expanded 1506according to the rules used in the 1507.Xr csh 1 1508.Ic glob 1509command. 1510If the 1511.Nm 1512command expects a single local file (e.g., 1513.Ic put ) , 1514only the first filename generated by the 1515.Dq globbing 1516operation is used. 1517.It 1518For 1519.Ic mget 1520commands and 1521.Ic get 1522commands with unspecified local file names, the local filename is 1523the remote filename, which may be altered by a 1524.Ic case , 1525.Ic ntrans , 1526or 1527.Ic nmap 1528setting. 1529The resulting filename may then be altered if 1530.Ic runique 1531is on. 1532.It 1533For 1534.Ic mput 1535commands and 1536.Ic put 1537commands with unspecified remote file names, the remote filename is 1538the local filename, which may be altered by a 1539.Ic ntrans 1540or 1541.Ic nmap 1542setting. 1543The resulting filename may then be altered by the remote server if 1544.Ic sunique 1545is on. 1546.El 1547.Sh FILE TRANSFER PARAMETERS 1548The FTP specification specifies many parameters which may 1549affect a file transfer. 1550The 1551.Ic type 1552may be one of 1553.Dq ascii , 1554.Dq binary , 1555or 1556.Dq image . 1557.Nm 1558supports the ASCII and image types of file transfer. 1559.Pp 1560.Nm 1561supports only the default values for the remaining 1562file transfer parameters: 1563.Ic mode , 1564.Ic form , 1565and 1566.Ic struct . 1567.Sh THE .netrc FILE 1568The 1569.Pa .netrc 1570file contains login and initialization information 1571used by the auto-login process. 1572It resides in the user's home directory. 1573The following tokens are recognized; they may be separated by spaces, 1574tabs, or new-lines: 1575.Bl -tag -width password 1576.It Ic machine Ar name 1577Identify a remote machine 1578.Ar name . 1579The auto-login process searches the 1580.Pa .netrc 1581file for a 1582.Ic machine 1583token that matches the remote machine specified on the 1584.Nm 1585command line or as an 1586.Ic open 1587command argument. 1588Once a match is made, the subsequent 1589.Pa .netrc 1590tokens are processed, 1591stopping when the end of file is reached or another 1592.Ic machine 1593or a 1594.Ic default 1595token is encountered. 1596.It Ic default 1597This is the same as 1598.Ic machine 1599.Ar name 1600except that 1601.Ic default 1602matches any name. 1603There can be only one 1604.Ic default 1605token, and it must be after all 1606.Ic machine 1607tokens. 1608This is normally used as: 1609.Pp 1610.Dl default login anonymous password user@site 1611.Pp 1612thereby giving the user 1613.Ar automatic 1614anonymous FTP login to 1615machines not specified in 1616.Pa .netrc . 1617This can be overridden 1618by using the 1619.Fl n 1620flag to disable auto-login. 1621.It Ic login Ar name 1622Identify a user on the remote machine. 1623If this token is present, the auto-login process will initiate 1624a login using the specified 1625.Ar name . 1626.It Ic password Ar string 1627Supply a password. 1628If this token is present, the auto-login process will supply the 1629specified string if the remote server requires a password as part 1630of the login process. 1631Note that if this token is present in the 1632.Pa .netrc 1633file for any user other 1634than 1635.Ar anonymous , 1636.Nm 1637will abort the auto-login process if the 1638.Pa .netrc 1639is readable by 1640anyone besides the user. 1641.It Ic account Ar string 1642Supply an additional account password. 1643If this token is present, the auto-login process will supply the 1644specified string if the remote server requires an additional 1645account password, or the auto-login process will initiate an 1646.Dv ACCT 1647command if it does not. 1648.It Ic macdef Ar name 1649Define a macro. 1650This token functions like the 1651.Nm 1652.Ic macdef 1653command functions. 1654A macro is defined with the specified name; its contents begin with the 1655next 1656.Pa .netrc 1657line and continue until a null line (consecutive new-line 1658characters) is encountered. 1659Like the other tokens in the 1660.Pa .netrc 1661file, a 1662.Ic macdef 1663is applicable only to the 1664.Ic machine 1665definition preceding it. 1666A 1667.Ic macdef 1668entry cannot be utilized by multiple 1669.Ic machine 1670definitions; rather, it must be defined following each 1671.Ic machine 1672it is intended to be used with. 1673If a macro named 1674.Ic init 1675is defined, it is automatically executed as the last step in the 1676auto-login process. 1677.El 1678.Sh COMMAND LINE EDITING 1679.Nm 1680supports interactive command line editing, via the 1681.Xr editline 3 1682library. 1683It is enabled with the 1684.Ic edit 1685command, and is enabled by default if input is from a tty. 1686Previous lines can be recalled and edited with the arrow keys, 1687and other GNU Emacs-style editing keys may be used as well. 1688.Pp 1689The 1690.Xr editline 3 1691library is configured with a 1692.Pa .editrc 1693file \- refer to 1694.Xr editrc 5 1695for more information. 1696.Pp 1697An extra key binding is available to 1698.Nm 1699to provide context sensitive command and filename completion 1700(including remote file completion). 1701To use this, bind a key to the 1702.Xr editline 3 1703command 1704.Ic ftp-complete . 1705By default, this is bound to the TAB key. 1706.Sh ENVIRONMENT 1707.Nm 1708utilizes the following environment variables: 1709.Bl -tag -width "FTPSERVERPORT" 1710.It Ev FTPMODE 1711Overrides the default operation mode. 1712Recognized values are: 1713.Pp 1714.Bl -tag -width "passive " -offset indent -compact 1715.It passive 1716passive mode FTP only 1717.It active 1718active mode FTP only 1719.It auto 1720automatic determination of passive or active (this is the default) 1721.It gate 1722gate-ftp mode 1723.El 1724.It Ev FTPSERVER 1725Host to use as gate-ftp server when 1726.Ic gate 1727is enabled. 1728.It Ev FTPSERVERPORT 1729Port to use when connecting to gate-ftp server when 1730.Ic gate 1731is enabled. 1732Default is port returned by a 1733.Fn getservbyname 1734lookup of 1735.Dq ftpgate/tcp . 1736.It Ev HOME 1737For default location of a 1738.Pa .netrc 1739file, if one exists. 1740.It Ev PAGER 1741Used by 1742.Ic page 1743to display files. 1744.It Ev SHELL 1745For default shell. 1746.It Ev ftp_proxy 1747URL of FTP proxy to use when making FTP URL requests 1748(if not defined, use the standard FTP protocol). 1749.It Ev http_proxy 1750URL of HTTP proxy to use when making HTTP or HTTPS URL requests. 1751.It Ev http_cookies 1752Path of a Netscape-like cookiejar file to use when making 1753HTTP or HTTPS URL requests. 1754.El 1755.Sh PORT ALLOCATION 1756For active mode data connections, 1757.Nm 1758will listen to a random high TCP port. 1759The interval of ports used are configurable using 1760.Xr sysctl 8 1761variables 1762.Va net.inet.ip.porthifirst 1763and 1764.Va net.inet.ip.porthilast . 1765.Sh SEE ALSO 1766.Xr basename 1 , 1767.Xr csh 1 , 1768.Xr more 1 , 1769.Xr stty 1 , 1770.Xr tar 1 , 1771.Xr tftp 1 , 1772.Xr editline 3 , 1773.Xr getservbyname 3 , 1774.Xr popen 3 , 1775.Xr editrc 5 , 1776.Xr services 5 , 1777.Xr ftp-proxy 8 , 1778.Xr ftpd 8 1779.Sh STANDARDS 1780.Rs 1781.%A J. Postel 1782.%A J. Reynolds 1783.%D October 1985 1784.%R RFC 959 1785.%T FILE TRANSFER PROTOCOL (FTP) 1786.Re 1787.Pp 1788.Rs 1789.%A P. Hethmon 1790.%D March 2007 1791.%R RFC 3659 1792.%T Extensions to FTP 1793.Re 1794.Sh HISTORY 1795The 1796.Nm 1797command appeared in 1798.Bx 4.2 . 1799.Sh BUGS 1800Correct execution of many commands depends upon proper behavior 1801by the remote server. 1802.Pp 1803In the recursive mode of 1804.Ic mget , 1805files and directories starting with whitespace are ignored 1806because the list cannot be parsed any other way. 1807