| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: ftp.1,v 1.140 2020/07/15 17:36:38 uwe Exp $ | | 1 | .\" $NetBSD: ftp.1,v 1.141 2020/07/15 19:23:44 uwe Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Luke Mewburn. | | 7 | .\" by Luke Mewburn. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -465,38 +465,36 @@ output. | | | @@ -465,38 +465,36 @@ output. |
465 | If no local file is specified, or if | | 465 | If no local file is specified, or if |
466 | .Ar local-file | | 466 | .Ar local-file |
467 | is | | 467 | is |
468 | .Sq Fl , | | 468 | .Sq Fl , |
469 | the output is sent to the terminal. | | 469 | the output is sent to the terminal. |
470 | .It Ic disconnect | | 470 | .It Ic disconnect |
471 | A synonym for | | 471 | A synonym for |
472 | .Ic close . | | 472 | .Ic close . |
473 | .It Ic edit | | 473 | .It Ic edit |
474 | Toggle command line editing, and context sensitive command and file | | 474 | Toggle command line editing, and context sensitive command and file |
475 | completion. | | 475 | completion. |
476 | This is automatically enabled if input is from a terminal, and | | 476 | This is automatically enabled if input is from a terminal, and |
477 | disabled otherwise. | | 477 | disabled otherwise. |
478 | .It Ic epsv epsv4 epsv6 | | 478 | .It Ic epsv , epsv4 , epsv6 |
479 | Toggle the use of the extended | | 479 | Toggle the use of the extended |
480 | .Dv EPSV | | 480 | .Dv EPSV |
481 | and | | 481 | and |
482 | .Dv EPRT | | 482 | .Dv EPRT |
483 | commands on all IP, IPv4, and IPv6 connections respectively. | | 483 | commands on all IP, IPv4, and IPv6 connections respectively. |
484 | First try | | 484 | First try |
485 | .Dv EPSV / | | 485 | .Dv EPSV Ns \^/\^ Ns Dv EPRT , |
486 | .Dv EPRT , | | | |
487 | and then | | 486 | and then |
488 | .Dv PASV / | | 487 | .Dv PASV Ns \^/\^ Ns Dv PORT . |
489 | .Dv PORT . | | | |
490 | This is enabled by default. | | 488 | This is enabled by default. |
491 | If an extended command fails then this option will be temporarily | | 489 | If an extended command fails then this option will be temporarily |
492 | disabled for the duration of the current connection, or until | | 490 | disabled for the duration of the current connection, or until |
493 | .Ic epsv , | | 491 | .Ic epsv , |
494 | .Ic epsv4 , | | 492 | .Ic epsv4 , |
495 | or | | 493 | or |
496 | .Ic epsv6 | | 494 | .Ic epsv6 |
497 | is executed again. | | 495 | is executed again. |
498 | .It Ic exit | | 496 | .It Ic exit |
499 | A synonym for | | 497 | A synonym for |
500 | .Ic bye . | | 498 | .Ic bye . |
501 | .It Ic features | | 499 | .It Ic features |
502 | Display what features the remote server supports (using the | | 500 | Display what features the remote server supports (using the |
| @@ -579,27 +577,27 @@ Globbing for | | | @@ -579,27 +577,27 @@ Globbing for |
579 | is done as in | | 577 | is done as in |
580 | .Xr csh 1 . | | 578 | .Xr csh 1 . |
581 | For | | 579 | For |
582 | .Ic mdelete , | | 580 | .Ic mdelete , |
583 | .Ic mget , | | 581 | .Ic mget , |
584 | and | | 582 | and |
585 | .Ic mreget , | | 583 | .Ic mreget , |
586 | each remote file name is expanded | | 584 | each remote file name is expanded |
587 | separately on the remote machine and the lists are not merged. | | 585 | separately on the remote machine and the lists are not merged. |
588 | Expansion of a directory name is likely to be | | 586 | Expansion of a directory name is likely to be |
589 | different from expansion of the name of an ordinary file: | | 587 | different from expansion of the name of an ordinary file: |
590 | the exact result depends on the foreign operating system and ftp server, | | 588 | the exact result depends on the foreign operating system and ftp server, |
591 | and can be previewed by doing | | 589 | and can be previewed by doing |
592 | .Ql mls remote-files \- | | 590 | .Sq Li mls remote-files \- . |
593 | Note: | | 591 | Note: |
594 | .Ic mget , | | 592 | .Ic mget , |
595 | .Ic mput | | 593 | .Ic mput |
596 | and | | 594 | and |
597 | .Ic mreget | | 595 | .Ic mreget |
598 | are not meant to transfer | | 596 | are not meant to transfer |
599 | entire directory subtrees of files. | | 597 | entire directory subtrees of files. |
600 | That can be done by | | 598 | That can be done by |
601 | transferring a | | 599 | transferring a |
602 | .Xr tar 1 | | 600 | .Xr tar 1 |
603 | archive of the subtree (in binary mode). | | 601 | archive of the subtree (in binary mode). |
604 | .It Ic hash Op Ar size | | 602 | .It Ic hash Op Ar size |
605 | Toggle hash-sign | | 603 | Toggle hash-sign |
| @@ -660,52 +658,52 @@ defined macros. | | | @@ -660,52 +658,52 @@ defined macros. |
660 | Macro names can be a maximum of 8 characters. | | 658 | Macro names can be a maximum of 8 characters. |
661 | Macros are only applicable to the current session they are | | 659 | Macros are only applicable to the current session they are |
662 | defined within (or if defined outside a session, to the session | | 660 | defined within (or if defined outside a session, to the session |
663 | invoked with the next | | 661 | invoked with the next |
664 | .Ic open | | 662 | .Ic open |
665 | command), and remain defined until a | | 663 | command), and remain defined until a |
666 | .Ic close | | 664 | .Ic close |
667 | command is executed. | | 665 | command is executed. |
668 | To invoke a macro, use the | | 666 | To invoke a macro, use the |
669 | .Ic $ | | 667 | .Ic $ |
670 | command (see above). | | 668 | command (see above). |
671 | .Pp | | 669 | .Pp |
672 | The macro processor interprets | | 670 | The macro processor interprets |
673 | .Sq $ | | 671 | .Ql $ |
674 | and | | 672 | and |
675 | .Sq \e | | 673 | .Ql \e |
676 | as special characters. | | 674 | as special characters. |
677 | A | | 675 | A |
678 | .Sq $ | | 676 | .Ql $ |
679 | followed by a number (or numbers) is replaced by the | | 677 | followed by a number (or numbers) is replaced by the |
680 | corresponding argument on the macro invocation command line. | | 678 | corresponding argument on the macro invocation command line. |
681 | A | | 679 | A |
682 | .Sq $ | | 680 | .Ql $ |
683 | followed by an | | 681 | followed by an |
684 | .Sq i | | 682 | .Ql i |
685 | signals the macro processor that the executing macro is to be | | 683 | signals the macro processor that the executing macro is to be |
686 | looped. | | 684 | looped. |
687 | On the first pass | | 685 | On the first pass |
688 | .Dq $i | | 686 | .Ql $i |
689 | is replaced by the first argument on the macro invocation command | | 687 | is replaced by the first argument on the macro invocation command |
690 | line, on the second pass it is replaced by the second argument, | | 688 | line, on the second pass it is replaced by the second argument, |
691 | and so on. | | 689 | and so on. |
692 | A | | 690 | A |
693 | .Sq \e | | 691 | .Ql \e |
694 | followed by any character is replaced by that character. | | 692 | followed by any character is replaced by that character. |
695 | Use the | | 693 | Use the |
696 | .Sq \e | | 694 | .Ql \e |
697 | to prevent special treatment of the | | 695 | to prevent special treatment of the |
698 | .Sq $ . | | 696 | .Ql $ . |
699 | .It Ic mdelete Op Ar remote-files | | 697 | .It Ic mdelete Op Ar remote-files |
700 | Delete the | | 698 | Delete the |
701 | .Ar remote-files | | 699 | .Ar remote-files |
702 | on the remote machine. | | 700 | on the remote machine. |
703 | .It Ic mdir Ar remote-files local-file | | 701 | .It Ic mdir Ar remote-files local-file |
704 | Like | | 702 | Like |
705 | .Ic dir , | | 703 | .Ic dir , |
706 | except multiple remote files may be specified. | | 704 | except multiple remote files may be specified. |
707 | If interactive prompting is on, | | 705 | If interactive prompting is on, |
708 | .Nm | | 706 | .Nm |
709 | will prompt the user to verify that the last argument is indeed the | | 707 | will prompt the user to verify that the last argument is indeed the |
710 | target local file for receiving | | 708 | target local file for receiving |
711 | .Ic mdir | | 709 | .Ic mdir |
| @@ -720,58 +718,58 @@ for each file name thus produced. | | | @@ -720,58 +718,58 @@ for each file name thus produced. |
720 | See | | 718 | See |
721 | .Ic glob | | 719 | .Ic glob |
722 | for details on the filename expansion. | | 720 | for details on the filename expansion. |
723 | Resulting file names will then be processed according to | | 721 | Resulting file names will then be processed according to |
724 | .Ic case , | | 722 | .Ic case , |
725 | .Ic ntrans , | | 723 | .Ic ntrans , |
726 | and | | 724 | and |
727 | .Ic nmap | | 725 | .Ic nmap |
728 | settings. | | 726 | settings. |
729 | Files are transferred into the local working directory, | | 727 | Files are transferred into the local working directory, |
730 | which can be changed with | | 728 | which can be changed with |
731 | .Ql lcd directory ; | | 729 | .Ql lcd directory ; |
732 | new local directories can be created with | | 730 | new local directories can be created with |
733 | .Ql "\&! mkdir directory" . | | 731 | .Sq Li "\&! mkdir directory" . |
734 | .It Ic mkdir Ar directory-name | | 732 | .It Ic mkdir Ar directory-name |
735 | Make a directory on the remote machine. | | 733 | Make a directory on the remote machine. |
736 | .It Ic mls Ar remote-files local-file | | 734 | .It Ic mls Ar remote-files local-file |
737 | Like | | 735 | Like |
738 | .Ic ls , | | 736 | .Ic ls , |
739 | except multiple remote files may be specified, | | 737 | except multiple remote files may be specified, |
740 | and the | | 738 | and the |
741 | .Ar local-file | | 739 | .Ar local-file |
742 | must be specified. | | 740 | must be specified. |
743 | If interactive prompting is on, | | 741 | If interactive prompting is on, |
744 | .Nm | | 742 | .Nm |
745 | will prompt the user to verify that the last argument is indeed the | | 743 | will prompt the user to verify that the last argument is indeed the |
746 | target local file for receiving | | 744 | target local file for receiving |
747 | .Ic mls | | 745 | .Ic mls |
748 | output. | | 746 | output. |
749 | .It Ic mlsd Op Ar remote-path | | 747 | .It Ic mlsd Op Ar remote-path |
750 | Display the contents of | | 748 | Display the contents of |
751 | .Ar remote-path | | 749 | .Ar remote-path |
752 | (which should default to the current directory if not given) | | 750 | (which should default to the current directory if not given) |
753 | in a machine-parsable form, using | | 751 | in a machine-parsable form, using |
754 | .Dv MLSD . | | 752 | .Dv MLSD . |
755 | The format of display can be changed with | | 753 | The format of display can be changed with |
756 | .Sq "remopts mlst ..." . | | 754 | .Sq Li "remopts mlst ..." . |
757 | .It Ic mlst Op Ar remote-path | | 755 | .It Ic mlst Op Ar remote-path |
758 | Display the details about | | 756 | Display the details about |
759 | .Ar remote-path | | 757 | .Ar remote-path |
760 | (which should default to the current directory if not given) | | 758 | (which should default to the current directory if not given) |
761 | in a machine-parsable form, using | | 759 | in a machine-parsable form, using |
762 | .Dv MLST . | | 760 | .Dv MLST . |
763 | The format of display can be changed with | | 761 | The format of display can be changed with |
764 | .Sq "remopts mlst ..." . | | 762 | .Sq Li "remopts mlst ..." . |
765 | .It Ic mode Ar mode-name | | 763 | .It Ic mode Ar mode-name |
766 | Set the file transfer | | 764 | Set the file transfer |
767 | .Ic mode | | 765 | .Ic mode |
768 | to | | 766 | to |
769 | .Ar mode-name . | | 767 | .Ar mode-name . |
770 | The default (and only supported) | | 768 | The default (and only supported) |
771 | mode is | | 769 | mode is |
772 | .Dq stream . | | 770 | .Dq stream . |
773 | .It Ic modtime Ar remote-file | | 771 | .It Ic modtime Ar remote-file |
774 | Show the last modification time of the file on the remote machine, in | | 772 | Show the last modification time of the file on the remote machine, in |
775 | .Li RFC 2822 | | 773 | .Li RFC 2822 |
776 | format. | | 774 | format. |
777 | .It Ic more Ar file | | 775 | .It Ic more Ar file |
| @@ -797,124 +795,144 @@ but performs a | | | @@ -797,124 +795,144 @@ but performs a |
797 | .Ic reget | | 795 | .Ic reget |
798 | instead of | | 796 | instead of |
799 | .Ic get . | | 797 | .Ic get . |
800 | .It Ic msend Ar local-files | | 798 | .It Ic msend Ar local-files |
801 | A synonym for | | 799 | A synonym for |
802 | .Ic mput . | | 800 | .Ic mput . |
803 | .It Ic newer Ar remote-file Op Ar local-file | | 801 | .It Ic newer Ar remote-file Op Ar local-file |
804 | Get the file only if the modification time of the remote file is more | | 802 | Get the file only if the modification time of the remote file is more |
805 | recent that the file on the current system. | | 803 | recent that the file on the current system. |
806 | If the file does not | | 804 | If the file does not |
807 | exist on the current system, the remote file is considered | | 805 | exist on the current system, the remote file is considered |
808 | .Ic newer . | | 806 | .Ic newer . |
809 | Otherwise, this command is identical to | | 807 | Otherwise, this command is identical to |
810 | .Ar get . | | 808 | .Ic get . |
811 | .It Ic nlist Op Ar remote-path Op Ar local-file | | 809 | .It Ic nlist Op Ar remote-path Op Ar local-file |
812 | A synonym for | | 810 | A synonym for |
813 | .Ic ls . | | 811 | .Ic ls . |
814 | .It Ic nmap Op Ar inpattern outpattern | | 812 | .It Ic nmap Op Ar inpattern outpattern |
815 | Set or unset the filename mapping mechanism. | | 813 | Set or unset the filename mapping mechanism. |
816 | If no arguments are specified, the filename mapping mechanism is unset. | | 814 | If no arguments are specified, the filename mapping mechanism is unset. |
817 | If arguments are specified, remote filenames are mapped during | | 815 | If arguments are specified, remote filenames are mapped during |
818 | .Ic mput | | 816 | .Ic mput |
819 | commands and | | 817 | commands and |
820 | .Ic put | | 818 | .Ic put |
821 | commands issued without a specified remote target filename. | | 819 | commands issued without a specified remote target filename. |
822 | If arguments are specified, local filenames are mapped during | | 820 | If arguments are specified, local filenames are mapped during |
823 | .Ic mget | | 821 | .Ic mget |
824 | commands and | | 822 | commands and |
825 | .Ic get | | 823 | .Ic get |
826 | commands issued without a specified local target filename. | | 824 | commands issued without a specified local target filename. |
827 | This command is useful when connecting to a | | 825 | This command is useful when connecting to a |
828 | .No non\- Ns Ux | | 826 | .No non\- Ns Ux |
829 | remote computer | | 827 | remote computer |
830 | with different file naming conventions or practices. | | 828 | with different file naming conventions or practices. |
831 | The mapping follows the pattern set by | | 829 | The mapping follows the pattern set by |
832 | .Ar inpattern | | 830 | .Ar inpattern |
833 | and | | 831 | and |
834 | .Ar outpattern . | | 832 | .Ar outpattern . |
835 | .Op Ar Inpattern | | 833 | .Pp |
| | | 834 | .Ar inpattern |
836 | is a template for incoming filenames (which may have already been | | 835 | is a template for incoming filenames (which may have already been |
837 | processed according to the | | 836 | processed according to the |
838 | .Ic ntrans | | 837 | .Ic ntrans |
839 | and | | 838 | and |
840 | .Ic case | | 839 | .Ic case |
841 | settings). | | 840 | settings). |
842 | Variable templating is accomplished by including the | | 841 | Variable templating is accomplished by including the |
843 | sequences | | 842 | sequences |
844 | .Dq $1 , | | 843 | .Ql $1 , |
845 | .Dq $2 , | | 844 | .Ql $2 , |
846 | \&... | | 845 | \&...\|, |
847 | .Dq $9 | | 846 | .Ql $9 |
848 | in | | 847 | in |
849 | .Ar inpattern . | | 848 | .Ar inpattern . |
850 | Use | | 849 | Use |
851 | .Sq \e | | 850 | .Ql \e |
852 | to prevent this special treatment of the | | 851 | to prevent this special treatment of the |
853 | .Sq $ | | 852 | .Ql $ |
854 | character. | | 853 | character. |
855 | All other characters are treated literally, and are used to determine the | | 854 | All other characters are treated literally, and are used to determine the |
856 | .Ic nmap | | 855 | .Ic nmap |
857 | .Op Ar inpattern | | 856 | .Op Ar inpattern |
858 | variable values. | | 857 | variable values. |
859 | For example, given | | 858 | For example, given |
860 | .Ar inpattern | | 859 | .Ar inpattern |
861 | $1.$2 and the remote file name "mydata.data", $1 would have the value | | 860 | .Sq Li $1.$2 |
862 | "mydata", and $2 would have the value "data". | | 861 | and the remote file name |
| | | 862 | .Sq Li mydata.data , |
| | | 863 | .Ql $1 |
| | | 864 | would have the value |
| | | 865 | .Sq Li mydata , |
| | | 866 | and |
| | | 867 | .Ql $2 |
| | | 868 | would have the value |
| | | 869 | .Sq Li data . |
| | | 870 | .Pp |
863 | The | | 871 | The |
864 | .Ar outpattern | | 872 | .Ar outpattern |
865 | determines the resulting mapped filename. | | 873 | determines the resulting mapped filename. |
866 | The sequences | | 874 | The sequences |
867 | .Dq $1 , | | 875 | .Ql $1 , |
868 | .Dq $2 , | | 876 | .Ql $2 , |
869 | \&... | | 877 | \&...\|, |
870 | .Dq $9 | | 878 | .Ql $9 |
871 | are replaced by any value resulting from the | | 879 | are replaced by any value resulting from the |
872 | .Ar inpattern | | 880 | .Ar inpattern |
873 | template. | | 881 | template. |
874 | The sequence | | 882 | The sequence |
875 | .Dq $0 | | 883 | .Ql $0 |
876 | is replaced by the original filename. | | 884 | is replaced by the original filename. |
877 | Additionally, the sequence | | 885 | Additionally, the sequence |
878 | .Dq Op Ar seq1 , Ar seq2 | | 886 | .Dq Op Ar seq1 , Ar seq2 |
879 | is replaced by | | 887 | is replaced by |
880 | .Op Ar seq1 | | 888 | .Ar seq1 |
881 | if | | 889 | if |
882 | .Ar seq1 | | 890 | .Ar seq1 |
883 | is not a null string; otherwise it is replaced by | | 891 | is not a null string; otherwise it is replaced by |
884 | .Ar seq2 . | | 892 | .Ar seq2 . |
885 | For example, the command | | 893 | For example, the command |
886 | .Pp | | 894 | .Pp |
887 | .Bd -literal -offset indent -compact | | 895 | .Dl nmap $1.$2.$3 [$1,$2].[$2,file] |
888 | nmap $1.$2.$3 [$1,$2].[$2,file] | | | |
889 | .Ed | | | |
890 | .Pp | | 896 | .Pp |
891 | would yield | | 897 | would yield |
892 | the output filename "myfile.data" for input filenames "myfile.data" and | | 898 | the output filename |
893 | "myfile.data.old", "myfile.file" for the input filename "myfile", and | | 899 | .Sq Li myfile.data |
894 | "myfile.myfile" for the input filename ".myfile". | | 900 | for input filenames |
| | | 901 | .Sq Li myfile.data |
| | | 902 | and |
| | | 903 | .Sq Li myfile.data.old , |
| | | 904 | .Sq Li myfile.file |
| | | 905 | for the input filename |
| | | 906 | .Sq Li myfile , |
| | | 907 | and |
| | | 908 | .Sq Li myfile.myfile |
| | | 909 | for the input filename |
| | | 910 | .Sq Li "\&.myfile" . |
895 | Spaces may be included in | | 911 | Spaces may be included in |
896 | .Ar outpattern , | | 912 | .Ar outpattern , |
897 | as in the example: | | 913 | as in the example: |
| | | 914 | .Pp |
898 | .Dl nmap $1 sed "s/ *$//" > $1 | | 915 | .Dl nmap $1 sed "s/ *$//" > $1 |
| | | 916 | .Pp |
899 | Use the | | 917 | Use the |
900 | .Sq \e | | 918 | .Ql \e |
901 | character to prevent special treatment | | 919 | character to prevent special treatment |
902 | of the | | 920 | of the |
903 | .Sq $ , | | 921 | .Ql $ , |
904 | .Sq \&[ , | | 922 | .Ql \&[ , |
905 | .Sq \&] , | | 923 | .Ql \&] , |
906 | and | | 924 | and |
907 | .Sq \&, | | 925 | .Ql \&, |
908 | characters. | | 926 | characters. |
909 | .It Ic ntrans Op Ar inchars Op Ar outchars | | 927 | .It Ic ntrans Op Ar inchars Op Ar outchars |
910 | Set or unset the filename character translation mechanism. | | 928 | Set or unset the filename character translation mechanism. |
911 | If no arguments are specified, the filename character | | 929 | If no arguments are specified, the filename character |
912 | translation mechanism is unset. | | 930 | translation mechanism is unset. |
913 | If arguments are specified, characters in | | 931 | If arguments are specified, characters in |
914 | remote filenames are translated during | | 932 | remote filenames are translated during |
915 | .Ic mput | | 933 | .Ic mput |
916 | commands and | | 934 | commands and |
917 | .Ic put | | 935 | .Ic put |
918 | commands issued without a specified remote target filename. | | 936 | commands issued without a specified remote target filename. |
919 | If arguments are specified, characters in | | 937 | If arguments are specified, characters in |
920 | local filenames are translated during | | 938 | local filenames are translated during |
| @@ -1015,27 +1033,27 @@ Perform | | | @@ -1015,27 +1033,27 @@ Perform |
1015 | .Op Ar remote-path , | | 1033 | .Op Ar remote-path , |
1016 | and display the result with the program specified by the | | 1034 | and display the result with the program specified by the |
1017 | .Ic "set pager" | | 1035 | .Ic "set pager" |
1018 | option. | | 1036 | option. |
1019 | .It Ic preserve | | 1037 | .It Ic preserve |
1020 | Toggle preservation of modification times on retrieved files. | | 1038 | Toggle preservation of modification times on retrieved files. |
1021 | .It Ic progress | | 1039 | .It Ic progress |
1022 | Toggle display of transfer progress bar. | | 1040 | Toggle display of transfer progress bar. |
1023 | The progress bar will be disabled for a transfer that has | | 1041 | The progress bar will be disabled for a transfer that has |
1024 | .Ar local-file | | 1042 | .Ar local-file |
1025 | as | | 1043 | as |
1026 | .Sq Fl | | 1044 | .Sq Fl |
1027 | or a command that starts with | | 1045 | or a command that starts with |
1028 | .Sq \&| . | | 1046 | .Ql \&| . |
1029 | Refer to | | 1047 | Refer to |
1030 | .Sx FILE NAMING CONVENTIONS | | 1048 | .Sx FILE NAMING CONVENTIONS |
1031 | for more information. | | 1049 | for more information. |
1032 | Enabling | | 1050 | Enabling |
1033 | .Ic progress | | 1051 | .Ic progress |
1034 | disables | | 1052 | disables |
1035 | .Ic hash . | | 1053 | .Ic hash . |
1036 | .It Ic prompt | | 1054 | .It Ic prompt |
1037 | Toggle interactive prompting. | | 1055 | Toggle interactive prompting. |
1038 | Interactive prompting | | 1056 | Interactive prompting |
1039 | occurs during multiple file transfers to allow the | | 1057 | occurs during multiple file transfers to allow the |
1040 | user to selectively retrieve or store files. | | 1058 | user to selectively retrieve or store files. |
1041 | If prompting is turned off (default is on), any | | 1059 | If prompting is turned off (default is on), any |
| @@ -1078,31 +1096,33 @@ Display a help message. | | | @@ -1078,31 +1096,33 @@ Display a help message. |
1078 | Any other response will answer | | 1096 | Any other response will answer |
1079 | .Sq yes | | 1097 | .Sq yes |
1080 | to the current file. | | 1098 | to the current file. |
1081 | .It Ic proxy Ar ftp-command | | 1099 | .It Ic proxy Ar ftp-command |
1082 | Execute an ftp command on a secondary control connection. | | 1100 | Execute an ftp command on a secondary control connection. |
1083 | This command allows simultaneous connection to two remote | | 1101 | This command allows simultaneous connection to two remote |
1084 | .Tn FTP | | 1102 | .Tn FTP |
1085 | servers for transferring files between the two servers. | | 1103 | servers for transferring files between the two servers. |
1086 | The first | | 1104 | The first |
1087 | .Ic proxy | | 1105 | .Ic proxy |
1088 | command should be an | | 1106 | command should be an |
1089 | .Ic open , | | 1107 | .Ic open , |
1090 | to establish the secondary control connection. | | 1108 | to establish the secondary control connection. |
1091 | Enter the command "proxy ?" to see other | | 1109 | Enter the command |
| | | 1110 | .Sq Li "proxy ?" |
| | | 1111 | to see other |
1092 | .Tn FTP | | 1112 | .Tn FTP |
1093 | commands executable on the secondary connection. | | 1113 | commands executable on the secondary connection. |
1094 | The following commands behave differently when prefaced by | | 1114 | The following commands behave differently when prefaced by |
1095 | .Ic proxy : | | 1115 | .Ic proxy\^ : |
1096 | .Ic open | | 1116 | .Ic open |
1097 | will not define new macros during the auto-login process, | | 1117 | will not define new macros during the auto-login process, |
1098 | .Ic close | | 1118 | .Ic close |
1099 | will not erase existing macro definitions, | | 1119 | will not erase existing macro definitions, |
1100 | .Ic get | | 1120 | .Ic get |
1101 | and | | 1121 | and |
1102 | .Ic mget | | 1122 | .Ic mget |
1103 | transfer files from the host on the primary control connection | | 1123 | transfer files from the host on the primary control connection |
1104 | to the host on the secondary control connection, and | | 1124 | to the host on the secondary control connection, and |
1105 | .Ic put , | | 1125 | .Ic put , |
1106 | .Ic mput , | | 1126 | .Ic mput , |
1107 | and | | 1127 | and |
1108 | .Ic append | | 1128 | .Ic append |
| @@ -1127,54 +1147,54 @@ in naming the remote file. | | | @@ -1127,54 +1147,54 @@ in naming the remote file. |
1127 | File transfer uses the | | 1147 | File transfer uses the |
1128 | current settings for | | 1148 | current settings for |
1129 | .Ic type , | | 1149 | .Ic type , |
1130 | .Ic format , | | 1150 | .Ic format , |
1131 | .Ic mode , | | 1151 | .Ic mode , |
1132 | and | | 1152 | and |
1133 | .Ic structure . | | 1153 | .Ic structure . |
1134 | .It Ic pwd | | 1154 | .It Ic pwd |
1135 | Print the name of the current working directory on the remote | | 1155 | Print the name of the current working directory on the remote |
1136 | machine. | | 1156 | machine. |
1137 | .It Ic quit | | 1157 | .It Ic quit |
1138 | A synonym for | | 1158 | A synonym for |
1139 | .Ic bye . | | 1159 | .Ic bye . |
1140 | .It Ic quote Ar arg1 arg2 ... | | 1160 | .It Ic quote Op Ar arg ... |
1141 | The arguments specified are sent, verbatim, to the remote | | 1161 | The arguments specified are sent, verbatim, to the remote |
1142 | .Tn FTP | | 1162 | .Tn FTP |
1143 | server. | | 1163 | server. |
1144 | .It Ic rate Ar direction Oo Ar maximum Oo Ar increment Oc Oc | | 1164 | .It Ic rate Ar direction Oo Ar maximum Oo Ar increment Oc Oc |
1145 | Throttle the maximum transfer rate to | | 1165 | Throttle the maximum transfer rate to |
1146 | .Ar maximum | | 1166 | .Ar maximum |
1147 | bytes/second. | | 1167 | bytes/second. |
1148 | If | | 1168 | If |
1149 | .Ar maximum | | 1169 | .Ar maximum |
1150 | is 0, disable the throttle. | | 1170 | is 0, disable the throttle. |
1151 | .Pp | | 1171 | .Pp |
1152 | .Ar direction | | 1172 | .Ar direction |
1153 | may be one of: | | 1173 | may be one of: |
1154 | .Bl -tag -width "all" -offset indent -compact | | 1174 | .Bl -tag -width ".Cm all" -offset indent -compact |
1155 | .It Cm all | | 1175 | .It Cm all |
1156 | Both directions. | | 1176 | Both directions. |
1157 | .It Cm get | | 1177 | .It Cm get |
1158 | Incoming transfers. | | 1178 | Incoming transfers. |
1159 | .It Cm put | | 1179 | .It Cm put |
1160 | Outgoing transfers. | | 1180 | Outgoing transfers. |
1161 | .El | | 1181 | .El |
1162 | .Pp | | 1182 | .Pp |
1163 | .Ar maximum | | 1183 | .Ar maximum |
1164 | can be modified on the fly by | | 1184 | can be modified on the fly by |
1165 | .Ar increment | | 1185 | .Ar increment |
1166 | bytes (default: 1024) each time a given signal is received: | | 1186 | bytes (default: 1024) each time a given signal is received: |
1167 | .Bl -tag -width "SIGUSR1" -offset indent | | 1187 | .Bl -tag -width ".Dv SIGUSR1" -offset indent |
1168 | .It Dv SIGUSR1 | | 1188 | .It Dv SIGUSR1 |
1169 | Increment | | 1189 | Increment |
1170 | .Ar maximum | | 1190 | .Ar maximum |
1171 | by | | 1191 | by |
1172 | .Ar increment | | 1192 | .Ar increment |
1173 | bytes. | | 1193 | bytes. |
1174 | .It Dv SIGUSR2 | | 1194 | .It Dv SIGUSR2 |
1175 | Decrement | | 1195 | Decrement |
1176 | .Ar maximum | | 1196 | .Ar maximum |
1177 | by | | 1197 | by |
1178 | .Ar increment | | 1198 | .Ar increment |
1179 | bytes. | | 1199 | bytes. |
1180 | The result must be a positive number. | | 1200 | The result must be a positive number. |
| @@ -1212,27 +1232,27 @@ This command | | | @@ -1212,27 +1232,27 @@ This command |
1212 | is useful when transferring very large files over networks that | | 1232 | is useful when transferring very large files over networks that |
1213 | are prone to dropping connections. | | 1233 | are prone to dropping connections. |
1214 | .It Ic remopts Ar command Op Ar command-options | | 1234 | .It Ic remopts Ar command Op Ar command-options |
1215 | Set options on the remote | | 1235 | Set options on the remote |
1216 | .Tn FTP | | 1236 | .Tn FTP |
1217 | server for | | 1237 | server for |
1218 | .Ar command | | 1238 | .Ar command |
1219 | to | | 1239 | to |
1220 | .Ar command-options | | 1240 | .Ar command-options |
1221 | (whose absence is handled on a command-specific basis). | | 1241 | (whose absence is handled on a command-specific basis). |
1222 | Remote | | 1242 | Remote |
1223 | .Tn FTP | | 1243 | .Tn FTP |
1224 | commands known to support options include: | | 1244 | commands known to support options include: |
1225 | .Sq MLST | | 1245 | .Dv MLST |
1226 | (used for | | 1246 | (used for |
1227 | .Dv MLSD | | 1247 | .Dv MLSD |
1228 | and | | 1248 | and |
1229 | .Dv MLST ) . | | 1249 | .Dv MLST ) . |
1230 | .It Ic rename Op Ar from Op Ar to | | 1250 | .It Ic rename Op Ar from Op Ar to |
1231 | Rename the file | | 1251 | Rename the file |
1232 | .Ar from | | 1252 | .Ar from |
1233 | on the remote machine, to the file | | 1253 | on the remote machine, to the file |
1234 | .Ar to . | | 1254 | .Ar to . |
1235 | .It Ic reset | | 1255 | .It Ic reset |
1236 | Clear reply queue. | | 1256 | Clear reply queue. |
1237 | This command re-synchronizes command/reply sequencing with the remote | | 1257 | This command re-synchronizes command/reply sequencing with the remote |
1238 | .Tn FTP | | 1258 | .Tn FTP |
| @@ -1265,30 +1285,36 @@ Delete a directory on the remote machine | | | @@ -1265,30 +1285,36 @@ Delete a directory on the remote machine |
1265 | With no arguments, show status of remote machine. | | 1285 | With no arguments, show status of remote machine. |
1266 | If | | 1286 | If |
1267 | .Ar remote-file | | 1287 | .Ar remote-file |
1268 | is specified, show status of | | 1288 | is specified, show status of |
1269 | .Ar remote-file | | 1289 | .Ar remote-file |
1270 | on remote machine. | | 1290 | on remote machine. |
1271 | .It Ic runique | | 1291 | .It Ic runique |
1272 | Toggle storing of files on the local system with unique filenames. | | 1292 | Toggle storing of files on the local system with unique filenames. |
1273 | If a file already exists with a name equal to the target | | 1293 | If a file already exists with a name equal to the target |
1274 | local filename for a | | 1294 | local filename for a |
1275 | .Ic get | | 1295 | .Ic get |
1276 | or | | 1296 | or |
1277 | .Ic mget | | 1297 | .Ic mget |
1278 | command, a ".1" is appended to the name. | | 1298 | command, a |
| | | 1299 | .Ql \&.1 |
| | | 1300 | is appended to the name. |
1279 | If the resulting name matches another existing file, | | 1301 | If the resulting name matches another existing file, |
1280 | a ".2" is appended to the original name. | | 1302 | a |
1281 | If this process continues up to ".99", an error | | 1303 | .Ql \&.2 |
| | | 1304 | is appended to the original name. |
| | | 1305 | If this process continues up to |
| | | 1306 | .Ql .99 , |
| | | 1307 | an error |
1282 | message is printed, and the transfer does not take place. | | 1308 | message is printed, and the transfer does not take place. |
1283 | The generated unique filename will be reported. | | 1309 | The generated unique filename will be reported. |
1284 | Note that | | 1310 | Note that |
1285 | .Ic runique | | 1311 | .Ic runique |
1286 | will not affect local files generated from a shell command | | 1312 | will not affect local files generated from a shell command |
1287 | (see below). | | 1313 | (see below). |
1288 | The default value is off. | | 1314 | The default value is off. |
1289 | .It Ic send Ar local-file Op Ar remote-file | | 1315 | .It Ic send Ar local-file Op Ar remote-file |
1290 | A synonym for | | 1316 | A synonym for |
1291 | .Ic put . | | 1317 | .Ic put . |
1292 | .It Ic sendport | | 1318 | .It Ic sendport |
1293 | Toggle the use of | | 1319 | Toggle the use of |
1294 | .Dv PORT | | 1320 | .Dv PORT |
| @@ -1346,27 +1372,27 @@ Defaults to | | | @@ -1346,27 +1372,27 @@ Defaults to |
1346 | .It Cm no_proxy | | 1372 | .It Cm no_proxy |
1347 | Defaults to | | 1373 | Defaults to |
1348 | .Ev $no_proxy . | | 1374 | .Ev $no_proxy . |
1349 | .It Cm pager | | 1375 | .It Cm pager |
1350 | Defaults to | | 1376 | Defaults to |
1351 | .Ev $PAGER . | | 1377 | .Ev $PAGER . |
1352 | .It Cm prompt | | 1378 | .It Cm prompt |
1353 | Defaults to | | 1379 | Defaults to |
1354 | .Ev $FTPPROMPT . | | 1380 | .Ev $FTPPROMPT . |
1355 | .It Cm rprompt | | 1381 | .It Cm rprompt |
1356 | Defaults to | | 1382 | Defaults to |
1357 | .Ev $FTPRPROMPT . | | 1383 | .Ev $FTPRPROMPT . |
1358 | .El | | 1384 | .El |
1359 | .It Ic site Ar arg1 arg2 ... | | 1385 | .It Ic site Op Ar arg ... |
1360 | The arguments specified are sent, verbatim, to the remote | | 1386 | The arguments specified are sent, verbatim, to the remote |
1361 | .Tn FTP | | 1387 | .Tn FTP |
1362 | server as a | | 1388 | server as a |
1363 | .Dv SITE | | 1389 | .Dv SITE |
1364 | command. | | 1390 | command. |
1365 | .It Ic size Ar remote-file | | 1391 | .It Ic size Ar remote-file |
1366 | Return size of | | 1392 | Return size of |
1367 | .Ar remote-file | | 1393 | .Ar remote-file |
1368 | on remote machine. | | 1394 | on remote machine. |
1369 | .It Ic sndbuf Ar size | | 1395 | .It Ic sndbuf Ar size |
1370 | Set the size of the socket send buffer to | | 1396 | Set the size of the socket send buffer to |
1371 | .Ar size . | | 1397 | .Ar size . |
1372 | .It Ic status | | 1398 | .It Ic status |
| @@ -1467,27 +1493,27 @@ if verbose is on, when a file transfer c | | | @@ -1467,27 +1493,27 @@ if verbose is on, when a file transfer c |
1467 | regarding the efficiency of the transfer are reported. | | 1493 | regarding the efficiency of the transfer are reported. |
1468 | By default, | | 1494 | By default, |
1469 | verbose is on. | | 1495 | verbose is on. |
1470 | .It Ic xferbuf Ar size | | 1496 | .It Ic xferbuf Ar size |
1471 | Set the size of the socket send and receive buffers to | | 1497 | Set the size of the socket send and receive buffers to |
1472 | .Ar size . | | 1498 | .Ar size . |
1473 | .It Ic \&? Op Ar command | | 1499 | .It Ic \&? Op Ar command |
1474 | A synonym for | | 1500 | A synonym for |
1475 | .Ic help . | | 1501 | .Ic help . |
1476 | .El | | 1502 | .El |
1477 | .Pp | | 1503 | .Pp |
1478 | Command arguments which have embedded spaces may be quoted with | | 1504 | Command arguments which have embedded spaces may be quoted with |
1479 | quote | | 1505 | quote |
1480 | .Sq \&" | | 1506 | .Ql \&\(dq |
1481 | marks. | | 1507 | marks. |
1482 | .Pp | | 1508 | .Pp |
1483 | Commands which toggle settings can take an explicit | | 1509 | Commands which toggle settings can take an explicit |
1484 | .Ic on | | 1510 | .Ic on |
1485 | or | | 1511 | or |
1486 | .Ic off | | 1512 | .Ic off |
1487 | argument to force the setting appropriately. | | 1513 | argument to force the setting appropriately. |
1488 | .Pp | | 1514 | .Pp |
1489 | Commands which take a byte count as an argument | | 1515 | Commands which take a byte count as an argument |
1490 | (e.g., | | 1516 | (e.g., |
1491 | .Ic hash , | | 1517 | .Ic hash , |
1492 | .Ic rate , | | 1518 | .Ic rate , |
1493 | and | | 1519 | and |
| @@ -1502,27 +1528,27 @@ Causes no modification. | | | @@ -1502,27 +1528,27 @@ Causes no modification. |
1502 | .It Li k | | 1528 | .It Li k |
1503 | Kilo; multiply the argument by 1024 | | 1529 | Kilo; multiply the argument by 1024 |
1504 | .It Li m | | 1530 | .It Li m |
1505 | Mega; multiply the argument by 1048576 | | 1531 | Mega; multiply the argument by 1048576 |
1506 | .It Li g | | 1532 | .It Li g |
1507 | Giga; multiply the argument by 1073741824 | | 1533 | Giga; multiply the argument by 1073741824 |
1508 | .El | | 1534 | .El |
1509 | .Pp | | 1535 | .Pp |
1510 | If | | 1536 | If |
1511 | .Nm | | 1537 | .Nm |
1512 | receives a | | 1538 | receives a |
1513 | .Dv SIGINFO | | 1539 | .Dv SIGINFO |
1514 | (see the | | 1540 | (see the |
1515 | .Dq status | | 1541 | .Cm status |
1516 | argument of | | 1542 | argument of |
1517 | .Xr stty 1 ) | | 1543 | .Xr stty 1 ) |
1518 | or | | 1544 | or |
1519 | .Dv SIGQUIT | | 1545 | .Dv SIGQUIT |
1520 | signal whilst a transfer is in progress, the current transfer rate | | 1546 | signal whilst a transfer is in progress, the current transfer rate |
1521 | statistics will be written to the standard error output, in the | | 1547 | statistics will be written to the standard error output, in the |
1522 | same format as the standard completion message. | | 1548 | same format as the standard completion message. |
1523 | .Sh AUTO-FETCHING FILES | | 1549 | .Sh AUTO-FETCHING FILES |
1524 | In addition to standard commands, this version of | | 1550 | In addition to standard commands, this version of |
1525 | .Nm | | 1551 | .Nm |
1526 | supports an auto-fetch feature. | | 1552 | supports an auto-fetch feature. |
1527 | To enable auto-fetch, simply pass the list of hostnames/files | | 1553 | To enable auto-fetch, simply pass the list of hostnames/files |
1528 | on the command line. | | 1554 | on the command line. |
| @@ -1532,27 +1558,27 @@ The following formats are valid syntax f | | | @@ -1532,27 +1558,27 @@ The following formats are valid syntax f |
1532 | .\" [user@]host:[path][/] | | 1558 | .\" [user@]host:[path][/] |
1533 | .It Oo Ar user Ns Li \&@ Oc Ns Ar host Ns Li \&: Ns Oo Ar path Oc \ | | 1559 | .It Oo Ar user Ns Li \&@ Oc Ns Ar host Ns Li \&: Ns Oo Ar path Oc \ |
1534 | Ns Oo Li / Oc | | 1560 | Ns Oo Li / Oc |
1535 | .Dq Classic | | 1561 | .Dq Classic |
1536 | .Tn FTP | | 1562 | .Tn FTP |
1537 | format. | | 1563 | format. |
1538 | .Pp | | 1564 | .Pp |
1539 | If | | 1565 | If |
1540 | .Ar path | | 1566 | .Ar path |
1541 | contains a glob character and globbing is enabled, | | 1567 | contains a glob character and globbing is enabled, |
1542 | (see | | 1568 | (see |
1543 | .Ic glob ) , | | 1569 | .Ic glob ) , |
1544 | then the equivalent of | | 1570 | then the equivalent of |
1545 | .Ql mget path | | 1571 | .Sq Li mget path |
1546 | is performed. | | 1572 | is performed. |
1547 | .Pp | | 1573 | .Pp |
1548 | If the directory component of | | 1574 | If the directory component of |
1549 | .Ar path | | 1575 | .Ar path |
1550 | contains no globbing characters, | | 1576 | contains no globbing characters, |
1551 | it is stored locally with the name basename (see | | 1577 | it is stored locally with the name basename (see |
1552 | .Xr basename 1 ) | | 1578 | .Xr basename 1 ) |
1553 | of | | 1579 | of |
1554 | .Ic path , | | 1580 | .Ic path , |
1555 | in the current directory. | | 1581 | in the current directory. |
1556 | Otherwise, the full remote name is used as the local name, | | 1582 | Otherwise, the full remote name is used as the local name, |
1557 | relative to the local root directory. | | 1583 | relative to the local root directory. |
1558 | .\" ftp://[user[:password]@]host[:port]/path[/][;type=X] | | 1584 | .\" ftp://[user[:password]@]host[:port]/path[/][;type=X] |
| @@ -1571,40 +1597,40 @@ Otherwise, transfer the URL using | | | @@ -1571,40 +1597,40 @@ Otherwise, transfer the URL using |
1571 | via the proxy defined in | | 1597 | via the proxy defined in |
1572 | .Ic "set ftp_proxy" . | | 1598 | .Ic "set ftp_proxy" . |
1573 | If | | 1599 | If |
1574 | .Ic "set ftp_proxy" | | 1600 | .Ic "set ftp_proxy" |
1575 | isn't defined and | | 1601 | isn't defined and |
1576 | .Ar user | | 1602 | .Ar user |
1577 | is given, login as | | 1603 | is given, login as |
1578 | .Ar user . | | 1604 | .Ar user . |
1579 | In this case, use | | 1605 | In this case, use |
1580 | .Ar password | | 1606 | .Ar password |
1581 | if supplied, otherwise prompt the user for one. | | 1607 | if supplied, otherwise prompt the user for one. |
1582 | .Pp | | 1608 | .Pp |
1583 | If a suffix of | | 1609 | If a suffix of |
1584 | .Sq ;type=A | | 1610 | .Sq Li \&;type=A |
1585 | or | | 1611 | or |
1586 | .Sq ;type=I | | 1612 | .Sq Li \&;type=I |
1587 | is supplied, then the transfer type will take place as | | 1613 | is supplied, then the transfer type will take place as |
1588 | ascii or binary (respectively). | | 1614 | ascii or binary (respectively). |
1589 | The default transfer type is binary. | | 1615 | The default transfer type is binary. |
1590 | .Pp | | 1616 | .Pp |
1591 | In order to be compliant with | | 1617 | In order to be compliant with |
1592 | .Li RFC 3986 , | | 1618 | .Li RFC 3986 , |
1593 | .Nm | | 1619 | .Nm |
1594 | interprets the | | 1620 | interprets the |
1595 | .Ar path | | 1621 | .Ar path |
1596 | part of an | | 1622 | part of an |
1597 | .Dq ftp:// | | 1623 | .Sq Li ftp:// |
1598 | auto-fetch URL as follows: | | 1624 | auto-fetch URL as follows: |
1599 | .Bl -bullet | | 1625 | .Bl -bullet |
1600 | .It | | 1626 | .It |
1601 | The | | 1627 | The |
1602 | .Sq Li / | | 1628 | .Sq Li / |
1603 | immediately after the | | 1629 | immediately after the |
1604 | .Ar host Ns Oo Li \&: Ns Ar port Oc | | 1630 | .Ar host Ns Oo Li \&: Ns Ar port Oc |
1605 | is interpreted as a separator before the | | 1631 | is interpreted as a separator before the |
1606 | .Ar path , | | 1632 | .Ar path , |
1607 | and not as part of the | | 1633 | and not as part of the |
1608 | .Ar path | | 1634 | .Ar path |
1609 | itself. | | 1635 | itself. |
1610 | .It | | 1636 | .It |
| @@ -1664,52 +1690,52 @@ and | | | @@ -1664,52 +1690,52 @@ and |
1664 | .Sq Li ~ ) . | | 1690 | .Sq Li ~ ) . |
1665 | .El | | 1691 | .El |
1666 | .Pp | | 1692 | .Pp |
1667 | The above interpretation has the following consequences: | | 1693 | The above interpretation has the following consequences: |
1668 | .Bl -bullet | | 1694 | .Bl -bullet |
1669 | .It | | 1695 | .It |
1670 | The path is interpreted relative to the | | 1696 | The path is interpreted relative to the |
1671 | default login directory of the specified user or of the | | 1697 | default login directory of the specified user or of the |
1672 | .Sq anonymous | | 1698 | .Sq anonymous |
1673 | user. | | 1699 | user. |
1674 | If the | | 1700 | If the |
1675 | .Pa / | | 1701 | .Pa / |
1676 | directory is required, use a leading path of | | 1702 | directory is required, use a leading path of |
1677 | .Dq %2F . | | 1703 | .Sq Li \&%2F . |
1678 | If a user's home directory is required (and the remote server supports | | 1704 | If a user's home directory is required (and the remote server supports |
1679 | the syntax), use a leading path of | | 1705 | the syntax), use a leading path of |
1680 | .Dq %7Euser/ . | | 1706 | .Sq Li \&%7E Ns Ar user Ns Li / . |
1681 | For example, to retrieve | | 1707 | For example, to retrieve |
1682 | .Pa /etc/motd | | 1708 | .Pa /etc/motd |
1683 | from | | 1709 | from |
1684 | .Sq localhost | | 1710 | .Sq Li localhost |
1685 | as the user | | 1711 | as the user |
1686 | .Sq myname | | 1712 | .Sq Li myname |
1687 | with the password | | 1713 | with the password |
1688 | .Sq mypass , | | 1714 | .Sq Li mypass , |
1689 | use | | 1715 | use |
1690 | .Dq ftp://myname:mypass@localhost/%2fetc/motd | | 1716 | .Sq Li ftp://myname:mypass@localhost/%2fetc/motd |
1691 | .It | | 1717 | .It |
1692 | The exact | | 1718 | The exact |
1693 | .Ic cd | | 1719 | .Ic cd |
1694 | and | | 1720 | and |
1695 | .Ic get | | 1721 | .Ic get |
1696 | commands can be controlled by careful choice of | | 1722 | commands can be controlled by careful choice of |
1697 | where to use | | 1723 | where to use |
1698 | .Sq / | | 1724 | .Sq Li / |
1699 | and where to use | | 1725 | and where to use |
1700 | .Sq %2F | | 1726 | .Sq Li \&%2F |
1701 | (or | | 1727 | (or |
1702 | .Sq %2f ) . | | 1728 | .Sq Li %2f ) . |
1703 | For example, the following URLs correspond to the | | 1729 | For example, the following URLs correspond to the |
1704 | equivalents of the indicated commands: | | 1730 | equivalents of the indicated commands: |
1705 | .Bl -tag -width "ftp://host/%2Fdir1%2Fdir2%2Ffile" | | 1731 | .Bl -tag -width "ftp://host/%2Fdir1%2Fdir2%2Ffile" |
1706 | .It ftp://host/dir1/dir2/file | | 1732 | .It ftp://host/dir1/dir2/file |
1707 | .Dq "cd dir1" , | | 1733 | .Dq "cd dir1" , |
1708 | .Dq "cd dir2" , | | 1734 | .Dq "cd dir2" , |
1709 | .Dq "get file" . | | 1735 | .Dq "get file" . |
1710 | .It ftp://host/%2Fdir1/dir2/file | | 1736 | .It ftp://host/%2Fdir1/dir2/file |
1711 | .Dq "cd /dir1" , | | 1737 | .Dq "cd /dir1" , |
1712 | .Dq "cd dir2" , | | 1738 | .Dq "cd dir2" , |
1713 | .Dq "get file" . | | 1739 | .Dq "get file" . |
1714 | .It ftp://host/dir1%2Fdir2/file | | 1740 | .It ftp://host/dir1%2Fdir2/file |
1715 | .Dq "cd dir1/dir2" , | | 1741 | .Dq "cd dir1/dir2" , |
| @@ -1736,51 +1762,51 @@ An | | | @@ -1736,51 +1762,51 @@ An |
1736 | URL, retrieved using the | | 1762 | URL, retrieved using the |
1737 | .Tn HTTP | | 1763 | .Tn HTTP |
1738 | protocol. | | 1764 | protocol. |
1739 | If | | 1765 | If |
1740 | .Ic "set http_proxy" | | 1766 | .Ic "set http_proxy" |
1741 | is defined, it is used as a URL to an | | 1767 | is defined, it is used as a URL to an |
1742 | .Tn HTTP | | 1768 | .Tn HTTP |
1743 | proxy server. | | 1769 | proxy server. |
1744 | If | | 1770 | If |
1745 | .Tn HTTP | | 1771 | .Tn HTTP |
1746 | authorization is required to retrieve | | 1772 | authorization is required to retrieve |
1747 | .Ar path , | | 1773 | .Ar path , |
1748 | and | | 1774 | and |
1749 | .Sq user | | 1775 | .Ar user |
1750 | (and optionally | | 1776 | (and optionally |
1751 | .Sq password ) | | 1777 | .Ar password\^ ) |
1752 | is in the URL, use them for the first attempt to authenticate. | | 1778 | is in the URL, use them for the first attempt to authenticate. |
1753 | .\" https://[user[:password]@]host[:port]/path | | 1779 | .\" https://[user[:password]@]host[:port]/path |
1754 | .It Li https:// Ns Oo Ar user Ns Oo Li \&: Ns Ar password Oc Ns Li \&@ Oc \ | | 1780 | .It Li https:// Ns Oo Ar user Ns Oo Li \&: Ns Ar password Oc Ns Li \&@ Oc \ |
1755 | Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path | | 1781 | Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path |
1756 | An | | 1782 | An |
1757 | .Tn HTTPS | | 1783 | .Tn HTTPS |
1758 | URL, retrieved using the | | 1784 | URL, retrieved using the |
1759 | .Tn HTTPS | | 1785 | .Tn HTTPS |
1760 | protocol. | | 1786 | protocol. |
1761 | If | | 1787 | If |
1762 | .Ic "set https_proxy" | | 1788 | .Ic "set https_proxy" |
1763 | is defined, it is used as a URL to an | | 1789 | is defined, it is used as a URL to an |
1764 | .Tn HTTPS | | 1790 | .Tn HTTPS |
1765 | proxy server. | | 1791 | proxy server. |
1766 | If | | 1792 | If |
1767 | .Tn HTTPS | | 1793 | .Tn HTTPS |
1768 | authorization is required to retrieve | | 1794 | authorization is required to retrieve |
1769 | .Ar path , | | 1795 | .Ar path , |
1770 | and | | 1796 | and |
1771 | .Sq user | | 1797 | .Ar user |
1772 | (and optionally | | 1798 | (and optionally |
1773 | .Sq password ) | | 1799 | .Ar password\^ ) |
1774 | is in the URL, use them for the first attempt to authenticate. | | 1800 | is in the URL, use them for the first attempt to authenticate. |
1775 | There is currently no certificate validation and verification. | | 1801 | There is currently no certificate validation and verification. |
1776 | .\" file:///path | | 1802 | .\" file:///path |
1777 | .It Li file:/// Ns Ar path | | 1803 | .It Li file:/// Ns Ar path |
1778 | A local URL, copied from | | 1804 | A local URL, copied from |
1779 | .Pa / Ns Ar path | | 1805 | .Pa / Ns Ar path |
1780 | on the local host. | | 1806 | on the local host. |
1781 | .\" about: | | 1807 | .\" about: |
1782 | .It Li about: Ns Ar topic | | 1808 | .It Li about: Ns Ar topic |
1783 | Display information regarding | | 1809 | Display information regarding |
1784 | .Ar topic ; | | 1810 | .Ar topic ; |
1785 | no file is retrieved for this auto-fetched element. | | 1811 | no file is retrieved for this auto-fetched element. |
1786 | Supported values include: | | 1812 | Supported values include: |
| @@ -1803,27 +1829,27 @@ of | | | @@ -1803,27 +1829,27 @@ of |
1803 | .Ar path . | | 1829 | .Ar path . |
1804 | Note that if a | | 1830 | Note that if a |
1805 | .Tn HTTP | | 1831 | .Tn HTTP |
1806 | redirect is received, the fetch is retried using the new target URL | | 1832 | redirect is received, the fetch is retried using the new target URL |
1807 | supplied by the server, with a corresponding new | | 1833 | supplied by the server, with a corresponding new |
1808 | .Ar path . | | 1834 | .Ar path . |
1809 | Using an explicit | | 1835 | Using an explicit |
1810 | .Fl o Ar output | | 1836 | .Fl o Ar output |
1811 | is recommended, to avoid writing to unexpected file names. | | 1837 | is recommended, to avoid writing to unexpected file names. |
1812 | .Pp | | 1838 | .Pp |
1813 | If a classic format or an | | 1839 | If a classic format or an |
1814 | .Tn FTP | | 1840 | .Tn FTP |
1815 | URL format has a trailing | | 1841 | URL format has a trailing |
1816 | .Sq / | | 1842 | .Ql / |
1817 | or an empty | | 1843 | or an empty |
1818 | .Ar path | | 1844 | .Ar path |
1819 | component, then | | 1845 | component, then |
1820 | .Nm | | 1846 | .Nm |
1821 | will connect to the site and | | 1847 | will connect to the site and |
1822 | .Ic cd | | 1848 | .Ic cd |
1823 | to the directory given as the path, and leave the user in interactive | | 1849 | to the directory given as the path, and leave the user in interactive |
1824 | mode ready for further input. | | 1850 | mode ready for further input. |
1825 | This will not work if | | 1851 | This will not work if |
1826 | .Ic "set ftp_proxy" | | 1852 | .Ic "set ftp_proxy" |
1827 | is being used. | | 1853 | is being used. |
1828 | .Pp | | 1854 | .Pp |
1829 | Direct | | 1855 | Direct |
| @@ -1851,96 +1877,97 @@ instead of | | | @@ -1851,96 +1877,97 @@ instead of |
1851 | For | | 1877 | For |
1852 | .Tn HTTP , | | 1878 | .Tn HTTP , |
1853 | this is implemented by using the | | 1879 | this is implemented by using the |
1854 | .Sq "Range: bytes=" | | 1880 | .Sq "Range: bytes=" |
1855 | .Tn "HTTP/1.1" | | 1881 | .Tn "HTTP/1.1" |
1856 | directive. | | 1882 | directive. |
1857 | .Pp | | 1883 | .Pp |
1858 | If WWW or proxy WWW authentication is required, you will be prompted | | 1884 | If WWW or proxy WWW authentication is required, you will be prompted |
1859 | to enter a username and password to authenticate with. | | 1885 | to enter a username and password to authenticate with. |
1860 | .Pp | | 1886 | .Pp |
1861 | When specifying IPv6 numeric addresses in a URL, you need to | | 1887 | When specifying IPv6 numeric addresses in a URL, you need to |
1862 | surround the address in square brackets. | | 1888 | surround the address in square brackets. |
1863 | E.g.: | | 1889 | E.g.: |
1864 | .Dq ftp://[::1]:21/ . | | 1890 | .Sq Li ftp://[::1]:21/ . |
1865 | This is because colons are used in IPv6 numeric address as well as | | 1891 | This is because colons are used in IPv6 numeric address as well as |
1866 | being the separator for the port number. | | 1892 | being the separator for the port number. |
1867 | .Sh ABORTING A FILE TRANSFER | | 1893 | .Sh ABORTING A FILE TRANSFER |
1868 | To abort a file transfer, use the terminal interrupt key | | 1894 | To abort a file transfer, use the terminal interrupt key |
1869 | (usually Ctrl-C). | | 1895 | (usually Ctrl-C). |
1870 | Sending transfers will be immediately halted. | | 1896 | Sending transfers will be immediately halted. |
1871 | Receiving transfers will be halted by sending an | | 1897 | Receiving transfers will be halted by sending an |
1872 | .Tn FTP | | 1898 | .Tn FTP |
1873 | protocol | | 1899 | protocol |
1874 | .Dv ABOR | | 1900 | .Dv ABOR |
1875 | command to the remote server, and discarding any further data received. | | 1901 | command to the remote server, and discarding any further data received. |
1876 | The speed at which this is accomplished depends upon the remote | | 1902 | The speed at which this is accomplished depends upon the remote |
1877 | server's support for | | 1903 | server's support for |
1878 | .Dv ABOR | | 1904 | .Dv ABOR |
1879 | processing. | | 1905 | processing. |
1880 | If the remote server does not support the | | 1906 | If the remote server does not support the |
1881 | .Dv ABOR | | 1907 | .Dv ABOR |
1882 | command, the prompt will not appear until the remote server has completed | | 1908 | command, the prompt will not appear until the remote server has completed |
1883 | sending the requested file. | | 1909 | sending the requested file. |
1884 | .Pp | | 1910 | .Pp |
1885 | If the terminal interrupt key sequence is used whilst | | 1911 | If the terminal interrupt key sequence is used whilst |
1886 | .Nm | | 1912 | .Nm |
1887 | is awaiting a reply from the remote server for the ABOR processing, | | 1913 | is awaiting a reply from the remote server for the |
| | | 1914 | .Dv ABOR |
| | | 1915 | processing, |
1888 | then the connection will be closed. | | 1916 | then the connection will be closed. |
1889 | This is different from the traditional behaviour (which ignores the | | 1917 | This is different from the traditional behaviour (which ignores the |
1890 | terminal interrupt during this phase), but is considered more useful. | | 1918 | terminal interrupt during this phase), but is considered more useful. |
1891 | .Sh FILE NAMING CONVENTIONS | | 1919 | .Sh FILE NAMING CONVENTIONS |
1892 | Files specified as arguments to | | 1920 | Files specified as arguments to |
1893 | .Nm | | 1921 | .Nm |
1894 | commands are processed according to the following rules. | | 1922 | commands are processed according to the following rules. |
1895 | .Bl -enum | | 1923 | .Bl -enum |
1896 | .It | | 1924 | .It |
1897 | If the file name | | 1925 | If the file name |
1898 | .Sq Fl | | 1926 | .Sq Fl |
1899 | is specified, the | | 1927 | is specified, the |
1900 | .Ar stdin | | 1928 | .Va stdin |
1901 | (for reading) or | | 1929 | (for reading) or |
1902 | .Ar stdout | | 1930 | .Va stdout |
1903 | (for writing) is used. | | 1931 | (for writing) is used. |
1904 | .It | | 1932 | .It |
1905 | If the first character of the file name is | | 1933 | If the first character of the file name is |
1906 | .Sq \&| , | | 1934 | .Ql \&| , |
1907 | the | | 1935 | the |
1908 | remainder of the argument is interpreted as a shell command. | | 1936 | remainder of the argument is interpreted as a shell command. |
1909 | .Nm | | 1937 | .Nm |
1910 | then forks a shell, using | | 1938 | then forks a shell, using |
1911 | .Xr popen 3 | | 1939 | .Xr popen 3 |
1912 | with the argument supplied, and reads (writes) from the stdout | | 1940 | with the argument supplied, and reads (writes) from the stdout |
1913 | (stdin). | | 1941 | (stdin). |
1914 | If the shell command includes spaces, the argument | | 1942 | If the shell command includes spaces, the argument |
1915 | must be quoted; e.g. | | 1943 | must be quoted; e.g. |
1916 | .Dq Qq Li \&| ls\ \-lt . | | 1944 | .Sq Li \(dq|\~ls\~\-lt\(dq . |
1917 | A particularly | | 1945 | A particularly |
1918 | useful example of this mechanism is: | | 1946 | useful example of this mechanism is: |
1919 | .Dq Li dir \&"\&" \&|more . | | 1947 | .Sq Li dir\~\(dq\(dq\~|more . |
1920 | .It | | 1948 | .It |
1921 | Failing the above checks, if | | 1949 | Failing the above checks, if globbing |
1922 | .Dq globbing | | | |
1923 | is enabled, local file names are expanded according to the rules | | 1950 | is enabled, local file names are expanded according to the rules |
1924 | used in the | | 1951 | used in the |
1925 | .Xr csh 1 ; | | 1952 | .Xr csh 1 ; |
1926 | see the | | 1953 | see the |
1927 | .Ic glob | | 1954 | .Ic glob |
1928 | command. | | 1955 | command. |
1929 | If the | | 1956 | If the |
1930 | .Nm | | 1957 | .Nm |
1931 | command expects a single local file (e.g. | | 1958 | command expects a single local file (e.g. |
1932 | .Ic put ) , | | 1959 | .Ic put ) , |
1933 | only the first filename generated by the "globbing" operation is used. | | 1960 | only the first filename generated by the globbing operation is used. |
1934 | .It | | 1961 | .It |
1935 | For | | 1962 | For |
1936 | .Ic mget | | 1963 | .Ic mget |
1937 | commands and | | 1964 | commands and |
1938 | .Ic get | | 1965 | .Ic get |
1939 | commands with unspecified local file names, the local filename is | | 1966 | commands with unspecified local file names, the local filename is |
1940 | the remote filename, which may be altered by a | | 1967 | the remote filename, which may be altered by a |
1941 | .Ic case , | | 1968 | .Ic case , |
1942 | .Ic ntrans , | | 1969 | .Ic ntrans , |
1943 | or | | 1970 | or |
1944 | .Ic nmap | | 1971 | .Ic nmap |
1945 | setting. | | 1972 | setting. |
1946 | The resulting filename may then be altered if | | 1973 | The resulting filename may then be altered if |
| @@ -2121,150 +2148,149 @@ followed by a blank line. | | | @@ -2121,150 +2148,149 @@ followed by a blank line. |
2121 | supports interactive command line editing, via the | | 2148 | supports interactive command line editing, via the |
2122 | .Xr editline 3 | | 2149 | .Xr editline 3 |
2123 | library. | | 2150 | library. |
2124 | It is enabled with the | | 2151 | It is enabled with the |
2125 | .Ic edit | | 2152 | .Ic edit |
2126 | command, and is enabled by default if input is from a tty. | | 2153 | command, and is enabled by default if input is from a tty. |
2127 | Previous lines can be recalled and edited with the arrow keys, | | 2154 | Previous lines can be recalled and edited with the arrow keys, |
2128 | and other GNU Emacs-style editing keys may be used as well. | | 2155 | and other GNU Emacs-style editing keys may be used as well. |
2129 | .Pp | | 2156 | .Pp |
2130 | The | | 2157 | The |
2131 | .Xr editline 3 | | 2158 | .Xr editline 3 |
2132 | library is configured with a | | 2159 | library is configured with a |
2133 | .Pa .editrc | | 2160 | .Pa .editrc |
2134 | file - refer to | | 2161 | file \(em refer to |
2135 | .Xr editrc 5 | | 2162 | .Xr editrc 5 |
2136 | for more information. | | 2163 | for more information. |
2137 | .Pp | | 2164 | .Pp |
2138 | An extra key binding is available to | | 2165 | An extra key binding is available to |
2139 | .Nm | | 2166 | .Nm |
2140 | to provide context sensitive command and filename completion | | 2167 | to provide context sensitive command and filename completion |
2141 | (including remote file completion). | | 2168 | (including remote file completion). |
2142 | To use this, bind a key to the | | 2169 | To use this, bind a key to the |
2143 | .Xr editline 3 | | 2170 | .Xr editline 3 |
2144 | command | | 2171 | command |
2145 | .Ic ftp-complete . | | 2172 | .Ic ftp-complete . |
2146 | By default, this is bound to the TAB key. | | 2173 | By default, this is bound to the TAB key. |
2147 | .Sh COMMAND LINE PROMPT | | 2174 | .Sh COMMAND LINE PROMPT |
2148 | By default, | | 2175 | By default, |
2149 | .Nm | | 2176 | .Nm |
2150 | displays a command line prompt of | | 2177 | displays a command line prompt of |
2151 | .Dq "ftp> " | | 2178 | .Sq Li ftp>\~ |
2152 | to the user. | | 2179 | to the user. |
2153 | This can be changed with the | | 2180 | This can be changed with the |
2154 | .Ic "set prompt" | | 2181 | .Ic "set prompt" |
2155 | command. | | 2182 | command. |
2156 | .Pp | | 2183 | .Pp |
2157 | A prompt can be displayed on the right side of the screen (after the | | 2184 | A prompt can be displayed on the right side of the screen (after the |
2158 | command input) with the | | 2185 | command input) with the |
2159 | .Ic "set rprompt" | | 2186 | .Ic "set rprompt" |
2160 | command. | | 2187 | command. |
2161 | .Pp | | 2188 | .Pp |
2162 | The following formatting sequences are replaced by the given | | 2189 | The following formatting sequences are replaced by the given |
2163 | information: | | 2190 | information: |
2164 | .Bl -tag -width "%% " -offset indent | | 2191 | .Bl -tag -width "%% " -offset indent |
2165 | .It Li \&%/ | | 2192 | .It Li \&%/ |
2166 | The current remote working directory. | | 2193 | The current remote working directory. |
2167 | .\" %c[[0]n], %.[[0]n] | | 2194 | .\" %c[[0]n], %.[[0]n] |
2168 | .It \&%c Ns Oo Oo Li 0 Oc Ns Ar n Oc , Ns Li \&%. Ns Oo Oo Li 0 Oc Ns Ar n Oc | | 2195 | .It Li \&%c Ns Oo Oo Li 0 Oc Ns Ar n Oc , Li \&%. Ns Oo Oo Li 0 Oc Ns Ar n Oc |
2169 | The trailing component of the current remote working directory, or | | 2196 | The trailing component of the current remote working directory, or |
2170 | .Em n | | 2197 | .Ar n |
2171 | trailing components if a digit | | 2198 | trailing components if a digit |
2172 | .Em n | | 2199 | .Ar n |
2173 | is given. | | 2200 | is given. |
2174 | If | | 2201 | If |
2175 | .Em n | | 2202 | .Ar n |
2176 | begins with | | 2203 | begins with |
2177 | .Sq 0 , | | 2204 | .Ql 0 , |
2178 | the number of skipped components precede the trailing component(s) in | | 2205 | the number of skipped components precede the trailing component(s) in |
2179 | the format | | 2206 | the format |
2180 | .\" ``/<number>trailing'' | | 2207 | .\" ``/<number>trailing'' |
2181 | .Do | | 2208 | .Do |
2182 | .Sm off | | 2209 | .Sm off |
2183 | .Li / Li < Va number Li > | | 2210 | .Li / Li < Ar number Li > |
2184 | .Va trailing | | 2211 | .Ar trailing |
2185 | .Sm on | | 2212 | .Sm on |
2186 | .Dc | | 2213 | .Dc |
2187 | (for | | 2214 | (for |
2188 | .Sq \&%c ) | | 2215 | .Ql \&%c ) |
2189 | or | | 2216 | or |
2190 | .\" ``...trailing'' | | 2217 | .\" ``...trailing'' |
2191 | .Dq Li \&... Ns Va trailing | | 2218 | .Dq Li \&... Ns Ar trailing |
2192 | (for | | 2219 | (for |
2193 | .Sq \&%. ) . | | 2220 | .Ql \&%. ) . |
2194 | .It Li \&%M | | 2221 | .It Li \&%M |
2195 | The remote host name. | | 2222 | The remote host name. |
2196 | .It Li \&%m | | 2223 | .It Li \&%m |
2197 | The remote host name, up to the first | | 2224 | The remote host name, up to the first dot |
2198 | .Sq \&. . | | 2225 | .Ql \&. . |
2199 | .It Li \&%n | | 2226 | .It Li \&%n |
2200 | The remote user name. | | 2227 | The remote user name. |
2201 | .It Li \&%% | | 2228 | .It Li \&%% |
2202 | A single | | 2229 | A single percent character |
2203 | .Sq % . | | 2230 | .Ql % . |
2204 | .El | | 2231 | .El |
2205 | .Sh ENVIRONMENT | | 2232 | .Sh ENVIRONMENT |
2206 | .Nm | | 2233 | .Nm |
2207 | uses the following environment variables. | | 2234 | uses the following environment variables. |
2208 | .Bl -tag -width "FTPSERVERPORT" | | 2235 | .Bl -tag -width "FTPSERVERPORT" |
2209 | .It Ev FTPANONPASS | | 2236 | .It Ev FTPANONPASS |
2210 | Password to send in an anonymous | | 2237 | Password to send in an anonymous |
2211 | .Tn FTP | | 2238 | .Tn FTP |
2212 | transfer. | | 2239 | transfer. |
2213 | Defaults to | | 2240 | Defaults to |
2214 | .Dq Li `whoami`@ . | | 2241 | .Dq Li \&\`whoami\`@ . |
2215 | .It Ev FTPMODE | | 2242 | .It Ev FTPMODE |
2216 | Overrides the default operation mode. | | 2243 | Overrides the default operation mode. |
2217 | Support values are: | | 2244 | Support values are: |
2218 | .Bl -tag -width "passive" | | 2245 | .Bl -tag -width "passive" |
2219 | .It Cm active | | 2246 | .It Cm active |
2220 | active mode | | 2247 | active mode |
2221 | .Tn FTP | | 2248 | .Tn FTP |
2222 | only | | 2249 | only |
2223 | .It Cm auto | | 2250 | .It Cm auto |
2224 | automatic determination of passive or active (this is the default) | | 2251 | automatic determination of passive or active (this is the default) |
2225 | .It Cm gate | | 2252 | .It Cm gate |
2226 | gate-ftp mode | | 2253 | gate-ftp mode |
2227 | .It Cm passive | | 2254 | .It Cm passive |
2228 | passive mode | | 2255 | passive mode |
2229 | .Tn FTP | | 2256 | .Tn FTP |
2230 | only | | 2257 | only |
2231 | .El | | 2258 | .El |
2232 | .It Ev FTPPROMPT | | 2259 | .It Ev FTPPROMPT |
2233 | Command-line prompt to use. | | 2260 | Command-line prompt to use. |
2234 | Defaults to | | 2261 | Defaults to |
2235 | .Dq "ftp> " . | | 2262 | .Sq Li ftp>\~ . |
2236 | Refer to | | 2263 | Refer to |
2237 | .Sx COMMAND LINE PROMPT | | 2264 | .Sx COMMAND LINE PROMPT |
2238 | for more information. | | 2265 | for more information. |
2239 | .It Ev FTPRPROMPT | | 2266 | .It Ev FTPRPROMPT |
2240 | Command-line right side prompt to use. | | 2267 | Command-line right side prompt to use. |
2241 | Defaults to | | 2268 | Defaults to empty string. |
2242 | .Dq "" . | | | |
2243 | Refer to | | 2269 | Refer to |
2244 | .Sx COMMAND LINE PROMPT | | 2270 | .Sx COMMAND LINE PROMPT |
2245 | for more information. | | 2271 | for more information. |
2246 | .It Ev FTPSERVER | | 2272 | .It Ev FTPSERVER |
2247 | Host to use as gate-ftp server when | | 2273 | Host to use as gate-ftp server when |
2248 | .Ic gate | | 2274 | .Ic gate |
2249 | is enabled. | | 2275 | is enabled. |
2250 | .It Ev FTPSERVERPORT | | 2276 | .It Ev FTPSERVERPORT |
2251 | Port to use when connecting to gate-ftp server when | | 2277 | Port to use when connecting to gate-ftp server when |
2252 | .Ic gate | | 2278 | .Ic gate |
2253 | is enabled. | | 2279 | is enabled. |
2254 | Default is port returned by a | | 2280 | Default is port returned by a |
2255 | .Fn getservbyname | | 2281 | .Xr getservbyname 3 |
2256 | lookup of | | 2282 | lookup of |
2257 | .Dq ftpgate/tcp . | | 2283 | .Dq Li ftpgate/tcp . |
2258 | .It Ev FTPUSERAGENT | | 2284 | .It Ev FTPUSERAGENT |
2259 | The value to send for the | | 2285 | The value to send for the |
2260 | .Tn HTTP | | 2286 | .Tn HTTP |
2261 | User-Agent | | 2287 | User-Agent |
2262 | header. | | 2288 | header. |
2263 | .It Ev HOME | | 2289 | .It Ev HOME |
2264 | For default location of a | | 2290 | For default location of a |
2265 | .Pa .netrc | | 2291 | .Pa .netrc |
2266 | file, if one exists. | | 2292 | file, if one exists. |
2267 | .It Ev NETRC | | 2293 | .It Ev NETRC |
2268 | An alternate location of the | | 2294 | An alternate location of the |
2269 | .Pa .netrc | | 2295 | .Pa .netrc |
2270 | file. | | 2296 | file. |
| @@ -2292,49 +2318,51 @@ for further notes about proxy use. | | | @@ -2292,49 +2318,51 @@ for further notes about proxy use. |
2292 | URL of | | 2318 | URL of |
2293 | .Tn HTTP | | 2319 | .Tn HTTP |
2294 | proxy to use when making | | 2320 | proxy to use when making |
2295 | .Tn HTTP | | 2321 | .Tn HTTP |
2296 | URL requests. | | 2322 | URL requests. |
2297 | If proxy authentication is required and there is a username and | | 2323 | If proxy authentication is required and there is a username and |
2298 | password in this URL, they will automatically be used in the first | | 2324 | password in this URL, they will automatically be used in the first |
2299 | attempt to authenticate to the proxy. | | 2325 | attempt to authenticate to the proxy. |
2300 | .Pp | | 2326 | .Pp |
2301 | If | | 2327 | If |
2302 | .Dq unsafe | | 2328 | .Dq unsafe |
2303 | URL characters are required in the username or password | | 2329 | URL characters are required in the username or password |
2304 | (for example | | 2330 | (for example |
2305 | .Sq @ | | 2331 | .Ql @ |
2306 | or | | 2332 | or |
2307 | .Sq / ) , | | 2333 | .Ql / ) , |
2308 | encode them with | | 2334 | encode them with |
2309 | .Li RFC 3986 | | 2335 | .Li RFC 3986 |
2310 | .Sq Li \&% Ns Ar XX | | 2336 | .Sq Li \&% Ns Ar XX |
2311 | encoding. | | 2337 | encoding. |
2312 | .Pp | | 2338 | .Pp |
2313 | Note that the use of a username and password in | | 2339 | Note that the use of a username and password in |
2314 | .Ev ftp_proxy | | 2340 | .Ev ftp_proxy |
2315 | and | | 2341 | and |
2316 | .Ev http_proxy | | 2342 | .Ev http_proxy |
2317 | may be incompatible with other programs that use it | | 2343 | may be incompatible with other programs that use it |
2318 | (such as | | 2344 | (such as |
2319 | .Xr lynx 1 ) . | | 2345 | .Xr lynx 1 ) . |
2320 | .Pp | | 2346 | .Pp |
2321 | .Em NOTE : | | 2347 | .Em NOTE : |
2322 | this is not used for interactive sessions, only for command-line | | 2348 | this is not used for interactive sessions, only for command-line |
2323 | fetches. | | 2349 | fetches. |
2324 | .It Ev no_proxy | | 2350 | .It Ev no_proxy |
2325 | A space or comma separated list of hosts (or domains) for which | | 2351 | A space or comma separated list of hosts (or domains) for which |
2326 | proxying is not to be used. | | 2352 | proxying is not to be used. |
2327 | Each entry may have an optional trailing ":port", which restricts | | 2353 | Each entry may have an optional trailing |
| | | 2354 | .Sq Li \&: Ns Ar port , |
| | | 2355 | which restricts |
2328 | the matching to connections to that port. | | 2356 | the matching to connections to that port. |
2329 | .El | | 2357 | .El |
2330 | .Sh EXTENDED PASSIVE MODE AND FIREWALLS | | 2358 | .Sh EXTENDED PASSIVE MODE AND FIREWALLS |
2331 | Some firewall configurations do not allow | | 2359 | Some firewall configurations do not allow |
2332 | .Nm | | 2360 | .Nm |
2333 | to use extended passive mode. | | 2361 | to use extended passive mode. |
2334 | If you find that even a simple | | 2362 | If you find that even a simple |
2335 | .Ic ls | | 2363 | .Ic ls |
2336 | appears to hang after printing a message such as this: | | 2364 | appears to hang after printing a message such as this: |
2337 | .Pp | | 2365 | .Pp |
2338 | .Dl 229 Entering Extended Passive Mode (|||58551|) | | 2366 | .Dl 229 Entering Extended Passive Mode (|||58551|) |
2339 | .Pp | | 2367 | .Pp |
2340 | then you will need to disable extended passive mode with | | 2368 | then you will need to disable extended passive mode with |