home *** CD-ROM | disk | FTP | other *** search
/ Tutto per Internet / Internet.iso / soft95 / FTP / ncftp / ncftp.man.print < prev    next >
Encoding:
Text File  |  1996-03-02  |  54.2 KB  |  1,454 lines

  1.  
  2.  
  3.  
  4. NcFTP(1)                         NcFTP(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        NcFTP - Internet    file transfer program
  9.  
  10. SSYYNNOOPPSSIISS
  11.        nnccffttpp    [_p_r_o_g_r_a_m    _o_p_t_i_o_n_s]    [[_o_p_e_n     _o_p_t_i_o_n_s]   _h_o_s_t_-
  12.        _n_a_m_e[::_p_a_t_h_n_a_m_e]]
  13.  
  14. OOPPTTIIOONNSS
  15.        Program options:
  16.      -D   :    Turn debug mode    and trace mode on.
  17.      -L   :    Don't use visual mode (use line    mode).
  18.      -V   :    Use visual mode.
  19.      -H   :    Dump the version information.
  20.  
  21.        Command-line open options:
  22.      -a   :    Open anonymously.
  23.      -u   :    Open with username and password    prompt.
  24.      -p X :    Use port number    X when opening.
  25.      -r   :    Redial until connected.
  26.      -d X :    Redial,    delaying X seconds between tries.
  27.      -g X :    Give up    after X    redials    without    connection.
  28.  
  29.        Command-line retrieve options:
  30.      -C   :    Force continuation (reget).
  31.      -f   :    Force overwrite.
  32.      -G   :    Don't use wildcard matching.
  33.      -R   :    Recursive.  Useful for    fetching  whole     directo-
  34.        ries.
  35.      -n X :    Get selected files only    if X days old or newer.
  36.  
  37. DDEESSCCRRIIPPTTIIOONN
  38.        _N_c_F_T_P  is  a  user interface to the Internet standard _F_i_l_e
  39.        _T_r_a_n_s_f_e_r    _P_r_o_t_o_c_o_l.  This    program    allows a user to transfer
  40.        files  to and from a remote network site, and offers addi-
  41.        tional features that are    not found in the standard  inter-
  42.        face, _f_t_p.
  43.  
  44.        The  program runs in one    of three modes:    _v_i_s_u_a_l _m_o_d_e, _l_i_n_e
  45.        _m_o_d_e, and _c_o_l_o_n _m_o_d_e.
  46.  
  47.        If your system is somewhat modern, the default mode should
  48.        be _v_i_s_u_a_l _m_o_d_e.    This is    a full-screen interface    that uses
  49.        the _c_u_r_s_e_s library.  With visual    mode, you edit    the  pro-
  50.        gram's  settings     with  a nice screen interface instead of
  51.        typing arcane commands.
  52.  
  53.        If you are not in visual    mode, you will be using    _l_i_n_e _m_o_d_e
  54.        for  the    interactive shell.  This mode is a no-frills com-
  55.        mand-line interface that    will look like    the  default  _f_t_p
  56.        program's command shell.
  57.  
  58.        The  third mode,    _c_o_l_o_n _m_o_d_e, refers to the program's abil-
  59.        ity to do a quick retrieve of a file  directly  from  your
  60.        shell  command  line, without going into    the program's own
  61.  
  62.  
  63.  
  64. NCEMRSoft              2.3.0                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NcFTP(1)                         NcFTP(1)
  71.  
  72.  
  73.        shell.  This mode is useful for shell scripts.
  74.  
  75. IINNTTRROODDUUCCTTIIOONN TTOO    VVIISSUUAALL MMOODDEE
  76.        When entering  visual  mode,  the  screen  clears  and  is
  77.        rewritten  with    the  splash  screen.   You should see the
  78.        black status bar    occupying the second to    last row  on  the
  79.        screen.     Beneath  the status bar is the    input line, where
  80.        you type    commands to the    program's shell.
  81.  
  82.        The program then    waits for you to do  something.      Usually
  83.        this  means you want to open a remote filesystem    to trans-
  84.        fer files to and    from your local    machine's filesystem.  To
  85.        do  that, you need to know the symbolic name of the remote
  86.        system, or its _I_n_t_e_r_n_e_t _P_r_o_t_o_c_o_l    (IP) address.  For  exam-
  87.        ple, a symbolic name might be ``typhoon.unl.edu,'' and its
  88.        IP address could    be ``129.93.33.24.''  To open  a  connec-
  89.        tion to that system, you    use the    program's _o_p_e_n command:
  90.  
  91.         open typhoon.unl.edu
  92.         open 129.93.33.24
  93.  
  94.        Both  of     these    try to open the    machine    called typhoon at
  95.        the _U_n_i_v_e_r_s_i_t_y _o_f _N_e_b_r_a_s_k_a.  Using the  symbolic     name  is
  96.        the preferred way, because IP addresses may change without
  97.        notice, while the symbolic names    usually    stay the same.
  98.  
  99.        When you    open a remote filesystem, you need to  have  per-
  100.        mission.     The _F_T_P _P_r_o_t_o_c_o_l's authentication system is very
  101.        similar to that of logging in to    your account.    You  have
  102.        to  give     an  account name, and its password for    access to
  103.        that account's files.  However, most remote  systems  that
  104.        have  anything you might    be interested in don't require an
  105.        account name for    use.  You can often get    anonymous  access
  106.        to  a  remote filesystem    and exchange files that    have been
  107.        made publicly accessible.  The  program    attempts  to  get
  108.        anonymous  permission to    a remote system    by default.  What
  109.        actually    happens    is that    the program tries to use ``anony-
  110.        mous''  as the account name, and    when prompted for a pass-
  111.        word, uses your E-mail address as a courtesy to the remote
  112.        system's     maintainer.  You can have the program try to use
  113.        a specific account also.     That will be explained    later.
  114.  
  115.        If the connection succeeded, you    should see the status bar
  116.        change  to  hold    the remote system's name on one    side, and
  117.        the current remote directory on the other  side.      To  see
  118.        what's  in  the    current    remote directory, you can use the
  119.        program's _l_s and    _d_i_r commands.  The former is terse,  pre-
  120.        ferring    more  remote  files in less screen space, and the
  121.        latter is more verbose, giving detailed information  about
  122.        each item in the    directory.
  123.  
  124.        You  can     use  the  program's  _c_d command to move to other
  125.        directories on the remote system.  The cd command  behaves
  126.        very  much like the command of the same name in the _B_o_u_r_n_e
  127.  
  128.  
  129.  
  130. NCEMRSoft              2.3.0                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NcFTP(1)                         NcFTP(1)
  137.  
  138.  
  139.        and _K_o_r_n    shell.
  140.  
  141.        The purpose of the program is to    exchange data with  other
  142.        systems.      You can use the program's _g_e_t    command    to copy    a
  143.        file from the remote system to your local system:
  144.  
  145.         get    README.txt
  146.  
  147.        The program will    display    the progress of    the  transfer  on
  148.        the  screen,  so     you  can  tell    how much needs to be done
  149.        before the transfer finishes.  When the transfer    does fin-
  150.        ish,  then  you    can  enter more    commands to the    program's
  151.        command shell.
  152.  
  153.        You can use the program's _p_u_t command to    copy a file  from
  154.        your system to the remote system:
  155.  
  156.         put    something.tar
  157.  
  158.        When  you  are  finished     using the remote system, you can
  159.        open another one    or use the _q_u_i_t    command    to terminate  the
  160.        program.
  161.  
  162. TTHHEE BBOOOOKKMMAARRKKSS FFIILLEE
  163.        One of the program's goals is to    minimize typing    and maxi-
  164.        mize convenience.  The program automatically saves  infor-
  165.        mation  about  the  sites  you  call  on    in a special file
  166.        called the _b_o_o_k_m_a_r_k_s file, which    is stored in  the  ._n_c_f_t_p
  167.        subdirectory  of    your home directory.  Each bookmark saves
  168.        the host    name along with     other    settings,  including  the
  169.        remote directory    you were in, the account information, and
  170.        more.  This makes it easy to call back a     site  later  and
  171.        have  everything     be  like  it  was when    you left the last
  172.        time.
  173.  
  174.        A big advantage of saving this information is that you can
  175.        refer  to  a  site  by  a  shorter,  more meaningful name,
  176.        instead of using    the full symbolic host name for     a  site.
  177.        For    example,      if    you    called     a   site   named
  178.        ``typhoon.unl.edu'' frequently, its bookmark name might be
  179.        just ``typhoon.''  Then,    instead    of:
  180.  
  181.         open typhoon.unl.edu
  182.  
  183.        you could use:
  184.  
  185.         open typhoon
  186.  
  187.        You  could  also     abbreviate the    bookmark name further, as
  188.        long as the program will    know which site    you are    referring
  189.        to.   If     no other bookmark's name starts with the letters
  190.        ``ty,'' you could do just:
  191.  
  192.         open ty
  193.  
  194.  
  195.  
  196. NCEMRSoft              2.3.0                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NcFTP(1)                         NcFTP(1)
  203.  
  204.  
  205.        Use the bookmarking feature to assign  mnemonic    names  to
  206.        hosts  whose  real  names don't give much hint to what you
  207.        call there for.    A popular game called _N_e_t_h_a_c_k is archived
  208.        at  linc.cis.upenn.edu,    in the /pub/NH3.1 directory.  You
  209.        could assign ``nethack''    as the    bookmark  name    for  this
  210.        site.  Then you could try:
  211.  
  212.         open nethack
  213.  
  214.        instead of:
  215.  
  216.         open linc.cis.upenn.edu
  217.  
  218. UUSSIINNGG TTHHEE BBOOOOKKMMAARRKK EEDDIITTOORR
  219.        To manipulate the bookmarks stored in your bookmarks file,
  220.        you use the program's bookmark editor.  Run  the     bookmark
  221.        editor  by  typing  the    _b_o_o_k_m_a_r_k_s command from within the
  222.        program.     This brings up    a new screen of    information.
  223.  
  224.        On the right side is the    list of    remote systems    the  pro-
  225.        gram has    saved for you already.    Each time you open a con-
  226.        nection to a remote system, the program saves an    entry  in
  227.        your bookmark file for you automatically.  If you have not
  228.        opened any sites    successfully  yet,  this  list    would  be
  229.        empty.
  230.  
  231.        On  the left side is some instructions saying what you can
  232.        do with the list.  The bookmark editor is waiting for  you
  233.        to do something,    like select a bookmark whose settings you
  234.        want to edit.
  235.  
  236.        Some bookmark editor ``hot  key''  commands  are     one  key
  237.        only.  You do not need to hit enter after the hot key com-
  238.        mands.  To exit the bookmark editor for example,    you would
  239.        just  type  the    ``x''  key  only.  The multi-key commands
  240.        require a slash first and do require the     enter    key.   To
  241.        delete  the selected site, for example, you would type the
  242.        ``/'' key, then ``del,''    and then the enter key.
  243.  
  244.        You can use the ``d'' key to move down  one  line  in  the
  245.        list,  and the ``u'' key    to move    up one line.  If you have
  246.        many entries in the bookmark list, you won't  be     able  to
  247.        see them    all at once.  The bookmark list    scrolls    as appro-
  248.        priate to bring the other sites into view.  Use the  ``p''
  249.        and ``n'' keys to move pages at a time.
  250.  
  251.        Another    way  to     select    a site in the bookmark list is to
  252.        use the capital letters.     If I  had  many  entries  in  my
  253.        bookmark     list, but wanted to select a site whose bookmark
  254.        name was    ``nethack,'' I could  type  ``N''  and    the  list
  255.        would  zoom  to the first site with bookmark starting with
  256.        the letter ``n.''
  257.  
  258.        After you have hilited a    bookmark you want  to  edit,  use
  259.  
  260.  
  261.  
  262. NCEMRSoft              2.3.0                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NcFTP(1)                         NcFTP(1)
  269.  
  270.  
  271.        the /_e_d command.     Doing that brings up another screen with
  272.        the settings for    that bookmark.
  273.  
  274.        In the _B_o_o_k_m_a_r_k _O_p_t_i_o_n_s screen, you use hot keys    to select
  275.        a  setting  to edit.  To    edit the bookmark name,    for exam-
  276.        ple, you    would type ``a.''  When    you are    finished  editing
  277.        this bookmark, hit the ``x'' key    to return to the bookmark
  278.        editor's    screen.
  279.  
  280. BBOOOOKKMMAARRKK OOPPTTIIOONNSS
  281.        Edit the    _B_o_o_k_m_a_r_k _n_a_m_e field to change the name you use to
  282.        open  this site with.  Remember,    when you change    the book-
  283.        mark name , you must use    this name to refer to  this  par-
  284.        ticular    bookmark,  so if you change it to ``foobar,'' you
  285.        need to use ``open foobar.''  This is required because you
  286.        can have    multiple entries for a remote host.  For example,
  287.        you could  have    two  bookmarks    for  wuarchive.wustl.edu,
  288.        named  ``wumac''     and  ``wuwindows.''   If you were to say
  289.        ``open wuarchive.wustl.edu,'' it    would not be clear to the
  290.        program which host entry    to use.
  291.  
  292.        Change  the  login information for the site by editing the
  293.        _U_s_e_r, _P_a_s_s_w_o_r_d, and _A_c_c_o_u_n_t fields.   Normally  you  would
  294.        want to leave these as is for anonymous logins.    Depending
  295.        on your situation,  you    might  want  to     use  a     specific
  296.        account    on the remote system.  This is one way to get the
  297.        program to use a    non-anonymous login.
  298.  
  299.        The _D_i_r_e_c_t_o_r_y field specifies the  directory  to     move  to
  300.        upon  successful     connection  to     the remote host for this
  301.        bookmark.  When you close the site, this    field is  updated
  302.        for you automatically to    be the directory you were in when
  303.        you closed the site.
  304.  
  305.        The _T_r_a_n_s_f_e_r _T_y_p_e field can be changed to use a    different
  306.        translation mode    when transferring files.  This program is
  307.        usually running on a _U_N_I_X system, and most remote  systems
  308.        are  also  _U_N_I_X    variants, so the default transfer type is
  309.        _b_i_n_a_r_y, which does no translation at all.
  310.  
  311.        However,    when you need to work with plain text  files  and
  312.        transfer     them  between    non-_U_N_I_X  systems, you can change
  313.        this to _A_S_C_I_I.  That will  guarantee  that  the    text-only
  314.        files will translate correctly.    Most often, you    will need
  315.        to use the _b_i_n_a_r_y transfer type.
  316.  
  317.        The _P_o_r_t    field can be changed so    that the program tries to
  318.        use a non-standard port number.    I have yet to ever need    a
  319.        different port number, but this capability is here in case
  320.        it's needed.
  321.  
  322.        The  _H_a_s     _S_I_Z_E  _C_o_m_m_a_n_d field will probably not need to be
  323.        edited.    This field is mostly for your  information  only.
  324.        The  _S_I_Z_E  command  is  an  _F_T_P    _P_r_o_t_o_c_o_l command that the
  325.  
  326.  
  327.  
  328. NCEMRSoft              2.3.0                5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. NcFTP(1)                         NcFTP(1)
  335.  
  336.  
  337.        program would like the remote server to support.     If it is
  338.        supported, the program can get an exact number of bytes of
  339.        remote files before transferring.  That is nice to know so
  340.        the progress reports work better.
  341.  
  342.        The  _H_a_s     _M_D_T_M  _C_o_m_m_a_n_d field will probably not need to be
  343.        edited either.  If the remote server supports it, the pro-
  344.        gram  can  get  the  exact modification date of the remote
  345.        file, and set the local file to the same    date.
  346.  
  347.        The _C_a_n _U_s_e _P_a_s_s_i_v_e _F_T_P field specifies whether the remote
  348.        server  allows  use  of    the  _F_T_P _P_r_o_t_o_c_o_l's _P_A_S_V command.
  349.        There are two ways to set up FTP    connections.  The default
  350.        way is what I call _P_o_r_t _F_T_P.  Unfortunately, _P_o_r_t _F_T_P can-
  351.        not be used when    your local host    is hiding behind a  _F_i_r_e_-
  352.        _w_a_l_l.  _P_a_s_s_i_v_e _F_T_P can be used with a firewall, and that's
  353.        why I would like    to use    that  method  if  possible.   You
  354.        probably     will not need to edit this field, since this can
  355.        be detected automatically most of the time.
  356.  
  357.        The _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m field is used by the program to  tell
  358.        if it can rely on certain dependencies to specific operat-
  359.        ing systems.  If    the OS is a UNIX variant, the program can
  360.        make some assumptions about the remote server's responses.
  361.        For example, if the OS is _U_N_I_X, the _l_s  command    tries  to
  362.        use  the    _-_C_F flags, like    you could with ``/bin/ls -CF'' on
  363.        _U_N_I_X.  If the OS    wasn't _U_N_I_X, the ``-CF'' might    not  make
  364.        sense  to  the  remote  server and it might complain.  You
  365.        probably    will not need to edit this field, since    this  can
  366.        be detected automatically most of the time.
  367.  
  368.        The comment field can be    used to    store a    brief description
  369.        about the site.    For example, for my ``nethack''    entry,    I
  370.        could  use  this     field    to hold    ``Archive site for latest
  371.        version of Nethack.''  When you are in the  bookmark  edi-
  372.        tor's  window, if you hilite a site that    has a comment, it
  373.        is printed at the bottom    of the screen so you do    not  have
  374.        to edit the site    to look    at it.
  375.  
  376. PPRREEFFEERREENNCCEESS
  377.        In  addition  to    remote-host specific options, the program
  378.        has global options that are user-configurable.  To  change
  379.        the  program's  preferences,  run  the  _p_r_e_f_s command from
  380.        within the program.
  381.  
  382.        The _D_e_f_a_u_l_t _o_p_e_n    _m_o_d_e  field  specifies    how  the  program
  383.        should try to open connections.    If you do a lot    of anony-
  384.        mous FTPing, you    should leave this set to _a_n_o_n_y_m_o_u_s.   You
  385.        might  want  to    set  this field    to _u_s_e_r    _& _p_a_s_s_w_o_r_d if the
  386.        hosts you FTP to    most often don't allow anonymous  logins.
  387.        For  example, if    you are    using the program on your company
  388.        network to copy things from  different  company    machines,
  389.        you would not want to use _a_n_o_n_y_m_o_u_s FTP mode.
  390.  
  391.  
  392.  
  393.  
  394. NCEMRSoft              2.3.0                6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. NcFTP(1)                         NcFTP(1)
  401.  
  402.  
  403.        The  _A_n_o_n_y_m_o_u_s  _p_a_s_s_w_o_r_d     field    lets you change    the value
  404.        given to    the remote host    when you use an    anonymous  login.
  405.        It  is  customary  (and sometimes required) to use your e-
  406.        mail address as the password for     anonymous  FTP,  so  the
  407.        remote  host's  administrator  knows who    is using the ser-
  408.        vice.  If the  program  didn't  get  your  e-mail  address
  409.        right,  or  you    want  to use something different, you can
  410.        change it here.
  411.  
  412.        The program now uses more whitespace than before    to reduce
  413.        eyestrain.   If    you prefer, you    can turn off that feature
  414.        by changing the _B_l_a_n_k _l_i_n_e_s _b_e_t_w_e_e_n _c_m_d_s    field.
  415.  
  416.        The program can log the transfers you do    to a file so  you
  417.        can  refer  to the log if you can't remember where you got
  418.        something.   To    turn  on  the  log,  which  is    saved  as
  419.        _~_/_._n_c_f_t_p_/_l_o_g,  you  can    set  the _U_s_e_r _l_o_g _s_i_z_e field to    a
  420.        number greater than zero.  You probably do not want to let
  421.        this file grow forever, so you set the maximum size of the
  422.        log by setting that field.
  423.  
  424.        Although    the program is perfectly happy saving every  site
  425.        you  ever  open in the bookmarks    file, you may want to put
  426.        an upper    bound on the number of sites saved.  If    you  have
  427.        a  slow    machine,  which     might    cause the program to take
  428.        awhile to load and save the bookmarks, or if disk space is
  429.        at  a premium, you can set the _M_a_x _b_o_o_k_m_a_r_k_s _t_o _s_a_v_e field
  430.        to limit    the number of bookmarks    saved.    Once  that  limit
  431.        is  reached,  the  program  will     discard sites whose time
  432.        since the last connection is the    longest.  In other words,
  433.        a  site    you  only  called once a long time ago and forgot
  434.        about will be the first to go.
  435.  
  436.        A few program functions need to use  a  _p_a_g_e_r  program  to
  437.        view large amounts of text.  For    example, the _p_a_g_e command
  438.        retrieves a remote file and uses    the  pager  to    view  it.
  439.        You  can     specify the program to    use (and its command line
  440.        flags, if any) by setting the _p_a_g_e_r field.
  441.  
  442.        When you    transfer files between the remote host    and  your
  443.        local  host, the    program    uses a _p_r_o_g_r_e_s_s    _m_e_t_e_r to show you
  444.        the status of the transfer.  The    program    has a few differ-
  445.        ent  progress  meters  to choose    from, and you can try out
  446.        the other ones by changing the _P_r_o_g_r_e_s_s _m_e_t_e_r field.
  447.  
  448.        You can control how much    of the remote server's chatter is
  449.        printed    by  changing the _R_e_m_o_t_e    _m_e_s_s_a_g_e_s field.     The pro-
  450.        gram always prints error    messages, but most  of    the  time
  451.        the  remote  server  doesn't  have anything useful to say.
  452.        There are a couple of messages that may be worth    printing.
  453.        The  first  is  the  _s_t_a_r_t_u_p _m_e_s_s_a_g_e.  Typically, when you
  454.        connect to a server  it    has  some  important  information
  455.        about the server.  Some servers have _c_h_d_i_r _m_e_s_s_a_g_e_s, which
  456.        are sent    when you enter a special directory.  You  specify
  457.  
  458.  
  459.  
  460. NCEMRSoft              2.3.0                7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. NcFTP(1)                         NcFTP(1)
  467.  
  468.  
  469.        whether    to  print  these  messages by toggling the _R_e_m_o_t_e
  470.        _m_e_s_s_a_g_e_s    field.
  471.  
  472.        By default, the program stays in    the  same  directory  you
  473.        were  in     when you ran the program, so that downloads will
  474.        go in that directory.  I    like to    use a  ``download  direc-
  475.        tory'' so that all of my    downloads go to    a specific direc-
  476.        tory.  This prevents me from exceeding my quota,    and over-
  477.        writing    my other files.     You can set the _S_t_a_r_t_u_p _i_n _L_o_c_a_l
  478.        _D_i_r field to have the program change the     local    directory
  479.        each time when the program starts up.  Then you know where
  480.        to expect your downloads    to end up.
  481.  
  482.        The program itself has some messages  which  you     may  get
  483.        tired of    and want to turn off.  You can change the _S_t_a_r_t_u_p
  484.        _m_e_s_s_a_g_e_s    field to specify whether the program  prints  its
  485.        ``splash     screen''  and    whether    it prints a _t_i_p    on how to
  486.        maximize    use of the program.
  487.  
  488.        When you    retrieve a remote file,    by  default  the  program
  489.        tries to    also set the exact modification    time of    the local
  490.        file as the remote file.     You can turn that off by  chang-
  491.        ing the _F_i_l_e _t_i_m_e_s_t_a_m_p_s field.
  492.  
  493.        If  you    don't  like the    full-screen graphics, you can use
  494.        the line-oriented mode by  changing  the     _S_c_r_e_e_n     _g_r_a_p_h_i_c_s
  495.        field.  Once you    turn _v_i_s_u_a_l mode off from the _P_r_e_f_e_r_e_n_c_e_s
  496.        screen, you won't be able to get    back to     the  preferences
  497.        screen  again  when  using  _l_i_n_e     mode.     To get    back into
  498.        visual mode, you    can run    the program with the ``-V'' flag,
  499.        like:
  500.  
  501.         ncftp -V
  502.  
  503. CCOOMMMMAANNDD    RREEFFEERREENNCCEE
  504.        I  will    now describe the commands that the program's com-
  505.        mand shell supports.  The first command to know    is  _h_e_l_p.
  506.        If you just type
  507.  
  508.         help
  509.  
  510.        from  the  command  shell, the program prints the names of
  511.        all of the supported commands.  From there,  you     can  get
  512.        specific     help  for a command by    typing the command after,
  513.        for example:
  514.  
  515.         help open
  516.  
  517.        prints information about    the _o_p_e_n command.
  518.  
  519.        The shell escape    command    is simply the exclamation  point,
  520.        _!  To spawn a shell, just do:
  521.  
  522.         !
  523.  
  524.  
  525.  
  526. NCEMRSoft              2.3.0                8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. NcFTP(1)                         NcFTP(1)
  533.  
  534.  
  535.        You can also use    this to    do one command only, like:
  536.  
  537.         !date +%H:%M:%S
  538.  
  539.  
  540.        The _c_d command changes the working directory on the remote
  541.        host.  Use this command to move to different areas on  the
  542.        remote  server.     If you    just opened a new site,    you might
  543.        be in the root directory.  Perhaps there    was  a    directory
  544.        called  ``/pub/news/comp.sources.d'' that someone told you
  545.        about.  From the    root directory,    you could:
  546.  
  547.         cd pub
  548.         cd news
  549.         cd comp.sources.d
  550.  
  551.        or, more    concisely,
  552.  
  553.         cd /pub/news/comp.sources.d
  554.  
  555.        Then, commands such as _g_e_t, _p_u_t,    and _l_s could be     used  to
  556.        refer to    items in that directory.
  557.  
  558.        Some shells in the _U_N_I_X environment have    a feature I like,
  559.        which is    switching to the previous directory.  Like  those
  560.        shells, you can do:
  561.  
  562.         cd -
  563.  
  564.        to change to the    last directory you were    in.
  565.  
  566.        The  _c_l_o_s_e command disconnects you from the remote server.
  567.        The program does    this for you automatically  when  needed,
  568.        so  you    can  simply  open other    sites or quit the program
  569.        without worrying    about closing the connection by    hand.
  570.  
  571.        Sometimes it may    be necessary to    use the     _c_r_e_a_t_e     command.
  572.        This  makes an empty file on the    remote host.  This can be
  573.        useful when you are unable to contact the remote     server's
  574.        administrator, but hope someone in the know will    spot your
  575.        file.  For example,
  576.  
  577.         create readline2.0.tar_is_corrupt
  578.  
  579.        might persuade someone to repost    that file.
  580.  
  581.        The _d_e_b_u_g command is mostly for use by me and the testers.
  582.        You could type
  583.  
  584.         debug 1
  585.  
  586.        to  turn     debugging  mode on.  Then you could see all mes-
  587.        sages between the  program  and    the  remote  server,  and
  588.        things  I  print     only in debugging mode.  If you report    a
  589.  
  590.  
  591.  
  592. NCEMRSoft              2.3.0                9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. NcFTP(1)                         NcFTP(1)
  599.  
  600.  
  601.        bug, I might ask    you to send me a _t_r_a_c_e file.  To do that,
  602.        you would run the program, and then type
  603.  
  604.         debug trace    1
  605.  
  606.        And so I    could see how the program was compiled,    you would
  607.        type
  608.  
  609.         version
  610.  
  611.        After you quit the program, you    could  then  send  me  an
  612.        email  with the contents    of the _~_/_._n_c_f_t_p_/_t_r_a_c_e file, which
  613.        would also have the version information in it.
  614.  
  615.        The _d_i_r command prints a    detailed directory  listing.   It
  616.        tries  to  behave  like _U_N_I_X's ``/bin/ls    -l'' command.  If
  617.        the remote server seems to be a _U_N_I_X host,  you    can  also
  618.        use the same flags you would with _l_s, for instance
  619.  
  620.         dir    -rt
  621.  
  622.        would try to act    like
  623.  
  624.         /bin/ls -lrt
  625.  
  626.        would on    _U_N_I_X.
  627.  
  628.        The  _e_c_h_o command wouldn't seem very useful, but    it can be
  629.        nice for    use with the program's macros.    It  behaves  like
  630.        the  equivalent    command     does  under  a     _U_N_I_X  shell, but
  631.        accepts some extra flags.  All ``percent'' flags     are  fed
  632.        through _s_t_r_f_t_i_m_e(4).  So    you could type
  633.  
  634.         echo It is now %H:%M on %B %d.
  635.  
  636.        and  you     should     get  something    like this printed on your
  637.        screen:
  638.  
  639.         It is now 19:00 on January 22.
  640.  
  641.        There are also ``at'' flags, which the program expands:
  642.  
  643.         @H : Name of connected host
  644.         @D : Full pathname of remote current working directory
  645.         @J : Short name of remote current working directory
  646.         @N : Newline.
  647.         @n : Bookmark name of connected host
  648.  
  649.        Example:
  650.  
  651.         echo "Connected to @H at %H:%M." >>    junk
  652.  
  653.        If you later looked at the contents of ``junk,''    it  might
  654.        say:
  655.  
  656.  
  657.  
  658. NCEMRSoft              2.3.0                   10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. NcFTP(1)                         NcFTP(1)
  665.  
  666.  
  667.         Connected to sphygmomanometer.unl.edu at 20:37.
  668.  
  669.        The  _g_e_t     command  copies  files     from the current working
  670.        directory on the    remote host  to     your  machine's  current
  671.        working    directory.  To place a copy of ``README'' in your
  672.        local directory,    you could try:
  673.  
  674.         get    README
  675.  
  676.        The _g_e_t command    has  some  powerful  features  which  are
  677.        described below,    in ``SPECIAL DOWNLOADING FEATURES.''
  678.  
  679.        The  _b_o_o_k_m_a_r_k_s  command    runs  the  _B_o_o_k_m_a_r_k  _E_d_i_t_o_r.  You
  680.        already know how    what that does,    since you read    the  sec-
  681.        tion above on it, right?
  682.  
  683.        The  _l_c_d    command    is the first of    a few ``l'' commands that
  684.        work with the local host.  This changes the current  work-
  685.        ing  directory on the local host.  If you want to download
  686.        files into a different local directory, you could use  _l_c_d
  687.        to change to that directory and then do your downloads.
  688.  
  689.        Another    local command that comes in handy is the _l_l_s com-
  690.        mand, which runs    ``/bin/ls'' on the local  host    and  dis-
  691.        plays  the  results  in the program's window.  You can use
  692.        the same    flags with _l_l_s    as  you     would    in  your  command
  693.        shell, so you can do things like:
  694.  
  695.         lcd    ~/doc
  696.         lls    -lrt p*.txt
  697.  
  698.        The program also    has a built-in interface to the    name ser-
  699.        vice via    the _l_o_o_k_u_p command.  This means     you  can  lookup
  700.        entries for remote hosts, like:
  701.  
  702.         lookup cse.unl.edu ftp.cs.unl.edu sphygmomanometer.unl.edu
  703.  
  704.        prints:
  705.  
  706.         cse.unl.edu     129.93.33.1
  707.         typhoon.unl.edu  129.93.33.24
  708.         sphygmomanometer.unl.edu  129.93.33.126
  709.  
  710.        There is    also a more detailed option, enabled with ``-v,''
  711.        i.e.:
  712.  
  713.         lookup -v cse.unl.edu ftp.cs.unl.edu
  714.  
  715.        prints:
  716.  
  717.         cse.unl.edu:
  718.         Name:      cse.unl.edu
  719.         Address:  129.93.33.1
  720.  
  721.  
  722.  
  723.  
  724. NCEMRSoft              2.3.0                   11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. NcFTP(1)                         NcFTP(1)
  731.  
  732.  
  733.         ftp.cs.unl.edu:
  734.         Name:      typhoon.unl.edu
  735.         Alias:      ftp.cs.unl.edu
  736.         Address:  129.93.33.24
  737.  
  738.        You can also give _I_P addresses, so this would work too:
  739.  
  740.         lookup 129.93.33.24
  741.  
  742.        prints:
  743.  
  744.         typhoon.unl.edu  129.93.33.24
  745.  
  746.        The _l_p_a_g_e command views a local file one    page at     a  time.
  747.        By  default,  the  program uses your pager program to view
  748.        the files.  You can choose to use the  built-in    pager  by
  749.        using the ``-b''    flag.  Example:
  750.  
  751.         lpage -b ~/.ncftp/bookmarks
  752.  
  753.        The  _l_p_w_d  command  is prints the current local directory.
  754.        Use this    command    when you forget    where  you  are     on  your
  755.        local machine.
  756.  
  757.        The _l_s command prints a brief directory listing.     It tries
  758.        to behave like _U_N_I_X's ``/bin/ls    -CF''  command.      If  the
  759.        remote  server  seems  to be a _U_N_I_X host, you can also use
  760.        the same    flags you would    with _l_s, for instance
  761.  
  762.         ls -rt
  763.  
  764.        would try to act    like
  765.  
  766.         /bin/ls -CFrt
  767.  
  768.        would on    _U_N_I_X.
  769.  
  770.        The _m_k_d_i_r command tries to create a new directory  on  the
  771.        remote host.  For many public archives, you won't have the
  772.        proper access permissions to do that.
  773.  
  774.        The _o_p_e_n    command    connects you  to  a  remote  host.   Many
  775.        times,  you  will  simply  open    a  host    without    using any
  776.        flags, but nonetheless the _o_p_e_n command has some    flags  to
  777.        enable certain features.
  778.  
  779.        To  force  an anonymous open, use the ``-a'' flag.  On the
  780.        _f_t_p_._p_r_o_b_e_._n_e_t machine, which is the official archive  site
  781.        for  _N_c_F_T_P, I have a need to use    both anonymous logins and
  782.        user logins.  The _B_o_o_k_m_a_r_k _E_d_i_t_o_r remembers type    of  login
  783.        I used last, so if the last time    was a user login, I could
  784.        use the ``-a'' flag to switch back to the anonymous  login
  785.        type  without  having to    use the    _B_o_o_k_m_a_r_k _E_d_i_t_o_r    to change
  786.        that.
  787.  
  788.  
  789.  
  790. NCEMRSoft              2.3.0                   12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. NcFTP(1)                         NcFTP(1)
  797.  
  798.  
  799.        Likewise, I could use the ``-u''     flag  to  force  a  user
  800.        open.   Then  I could give my account name and password to
  801.        access that account.
  802.  
  803.        Many of the big archive sites like _w_u_a_r_c_h_i_v_e_._w_u_s_t_l_._e_d_u are
  804.        busy,  so you aren't guaranteed a connection to them.  The
  805.        program lets you    ``redial'' sites  periodically,     until    a
  806.        connection  succeeds.  Use the ``-r' flag to turn on auto-
  807.        matic redial.
  808.  
  809.        Redial itself has a  few     parameters.   You  can     set  the
  810.        delay, in seconds, of the time spent waiting between redi-
  811.        als.  You can also have the program give    up after a  maxi-
  812.        mum  number of redials is reached.  Here's an example that
  813.        fully utilizes redial mode:
  814.  
  815.        open -r -d 75 -g    10 bowser.nintendo.co.jp
  816.  
  817.        The ``-r'' turns    on redialing, the ``-d'' sets the  redial
  818.        delay  to 75 seconds, and the ``-g'' flag limits    redialing
  819.        to 10 tries.  If    you like, you can just trust the  default
  820.        redial settings and only    use ``-r.''
  821.  
  822.        The _o_p_e_n    command    will run the _B_o_o_k_m_a_r_k _E_d_i_t_o_r if    you don't
  823.        supply a    hostname to open.  You can use the _B_o_o_k_m_a_r_k  _E_d_i_-
  824.        _t_o_r  to    select    a  host    and open it by hitting the _r_e_t_u_r_n
  825.        key.
  826.  
  827.        The _p_a_g_e    command    lets you browse    a remote file one page at
  828.        a time.    This is    useful for reading README's on the remote
  829.        host without downloading    them first.   This  command  uses
  830.        whatever    program    you have set the _p_a_g_e_r field in    the _P_r_e_f_-
  831.        _e_r_e_n_c_e_s screen to view the file.
  832.  
  833.        The _p_d_i_r    and _p_l_s    commands are equivalent     to  _d_i_r  and  _l_s
  834.        respectively,  only  they feed their output to your pager.
  835.        These commands are primarily for    _l_i_n_e _m_o_d_e because  direc-
  836.        tory listings can scroll    offscreen.  If you do a    normal _l_s
  837.        while in    _v_i_s_u_a_l mode, if    it would go offscreen, the built-
  838.        in pager    kicks in automatically.     Therefore I don't recom-
  839.        mend using _p_d_i_r and _p_l_s while in    _v_i_s_u_a_l mode.
  840.  
  841.        The _r_e_d_i_r and _p_r_e_d_i_r commands give you a    way to re-display
  842.        the  last directory listing.  The program saves the output
  843.        from the    last _d_i_r or _l_s command you did,    so if you want to
  844.        see it again you    can do this without wasting network band-
  845.        width.  The _p_r_e_d_i_r command is the same  as  _r_e_d_i_r,  except
  846.        that the    output is fed to your pager.
  847.  
  848.        I  have    found that I mostly download, and have next to no
  849.        need at all to upload.  But the _p_u_t command  is    there  in
  850.        case  you need to upload    files to remote    hosts.    For exam-
  851.        ple, if I wanted    to send    some files to a     remote     host,    I
  852.        could do:
  853.  
  854.  
  855.  
  856. NCEMRSoft              2.3.0                   13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. NcFTP(1)                         NcFTP(1)
  863.  
  864.  
  865.         lcd    ~/docs/files
  866.         put    02.txt 03.txt 05.txt 07.txt 11.txt
  867.  
  868.        The  _p_u_t     command  won't    work if    you don't have the proper
  869.        access permissions on the remote    host.  Also, this command
  870.        doesn't have any    of the special features    that the _g_e_t com-
  871.        mand has, except    for the    ``-z'' option.
  872.  
  873.        The _p_w_d command prints the current remote  working  direc-
  874.        tory.  In _v_i_s_u_a_l    mode, this is in the status bar.
  875.  
  876.        If  you    need to    change the name    of a remote file, you can
  877.        use the _r_e_n_a_m_e command, like:
  878.  
  879.         rename SPHYGMTR.TAR    sphygmomanometer-2.3.1.tar
  880.  
  881.        Of course, when you finish using    the program, type _q_u_i_t to
  882.        end the program (You could also use _b_y_e,    _e_x_i_t, or _^_D).
  883.  
  884.        The  _q_u_o_t_e command can be used to send a    direct _F_T_P _P_r_o_t_o_-
  885.        _c_o_l command to the remote server.   Generally  this  isn't
  886.        too useful to the average user (or me either).
  887.  
  888.        The  _r_h_e_l_p  command  sends  a  help  request to the remote
  889.        server.    The  list  of  _F_T_P  _P_r_o_t_o_c_o_l  commands    is  often
  890.        printed,     and  sometimes     some  other  information that is
  891.        actually    useful,    like how to reach the site administrator.
  892.  
  893.        Depending  on the remote    server,    you may    be able    to give    a
  894.        parameter to the    server also, like:
  895.  
  896.         rhelp NLST
  897.  
  898.        One server responded:
  899.  
  900.         Syntax: NLST [ <sp>    path-name ]
  901.  
  902.        If you need to delete a remote file you    can  try  the  _r_m
  903.        command.      Much    of  the     time this won't work because you
  904.        won't have the proper access  permissions.   This  command
  905.        doesn't    accept    any flags, so you can't    nuke a whole tree
  906.        by using    ``-rf''    flags like you can on _U_N_I_X.
  907.  
  908.        Similarly, the _r_m_d_i_r command removes a directory.  Depend-
  909.        ing on the remote server, you may be able to remove a non-
  910.        empty directory,    so be careful.
  911.  
  912.        The _s_e_t command is  provided  for  backward  compatibility
  913.        with  older  versions of    the program, and is superseded by
  914.        the _p_r_e_f_s command.  The basic syntax is:
  915.  
  916.         set    option value
  917.  
  918.        Where the option    is the short name  of  the  corresponding
  919.  
  920.  
  921.  
  922. NCEMRSoft              2.3.0                   14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. NcFTP(1)                         NcFTP(1)
  929.  
  930.  
  931.        field  in  the _P_r_e_f_e_r_e_n_c_e_s screen.  The short names of the
  932.        preferences  fields  can     be  found   by      browsing   your
  933.        _~_/_._n_c_f_t_p_/_p_r_e_f_s  file.  This command is mainly for use with
  934.        _l_i_n_e _m_o_d_e, but since that mode  is  no  longer  officially
  935.        supported by me,    I want to discourage the use of    this com-
  936.        mand.
  937.  
  938.        One obscure command you may have    to use someday    is  _s_i_t_e.
  939.        The  _F_T_P     _P_r_o_t_o_c_o_l  allows for ``site specific''    commands.
  940.        These ``site'' commands vary of    course,     but  one  common
  941.        sub-command  that  is  useful  that  some sites support is
  942.        _c_h_m_o_d, i.e.:
  943.  
  944.         site chmod 644 README
  945.  
  946.        Try doing one of    these to see what the remote server  sup-
  947.        ports, if any:
  948.  
  949.         rhelp SITE
  950.         site help
  951.  
  952.        You may need to change transfer types during the    course of
  953.        a session with a    server.     You can use the _t_y_p_e command  to
  954.        do this.     Try one of these:
  955.  
  956.         type ascii
  957.         type binary
  958.         type image
  959.  
  960.        If  you    ever need to contact me    about the program, please
  961.        familiarize yourself with the _v_e_r_s_i_o_n command.  This  com-
  962.        mand  dumps  a lot of information that tells me which edi-
  963.        tion of    the  program  you  are    using,    and  how  it  was
  964.        installed on your system.  Here's a way to save the output
  965.        of this command to a file, so you can send it to    me:
  966.  
  967.         version > version.txt
  968.  
  969.  
  970. SSPPEECCIIAALL    DDOOWWNNLLOOAADDIINNGG FFEEAATTUURREESS
  971.        You probably already know that you use the _g_e_t command  to
  972.        copy  files on the remote host to the local host.  But the
  973.        _g_e_t command has a few other tricks  that     you  might  find
  974.        useful.    First of all, _n_c_f_t_p skips files    you already have.
  975.        If you try to
  976.  
  977.         get    file24
  978.  
  979.        and there is a file named ``file24'' in the current  local
  980.        directory   already,  the  program  uses     some  additional
  981.        heuristics to determine if it should actually  waste  net-
  982.        work bandwidth to download it again.
  983.  
  984.        The  program  tries to get the date and size of the remote
  985.  
  986.  
  987.  
  988. NCEMRSoft              2.3.0                   15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. NcFTP(1)                         NcFTP(1)
  995.  
  996.  
  997.        file ``file24.''     If that file has the exact same date and
  998.        size  as     the local file    ``file24,'' the    program    will skip
  999.        over that file.    If the program could not get the date  or
  1000.        size  of    the remote file, or the    size differs, the program
  1001.        will go ahead and fetch the file.
  1002.  
  1003.        In addition, if the local file's    date is     newer    than  the
  1004.        remote file's date, the program skips the download because
  1005.        it concludes you    already    have a more recent version.
  1006.  
  1007.        What all    this means for you is that you can use    the  pro-
  1008.        gram  to     _m_i_r_r_o_r     another archive.  For example,    you might
  1009.        have a task that    requires you keep a  mirror  of     all  the
  1010.        files  of  a  remote  directory called ``files.''  In that
  1011.        directory, there    might be dozens    of files, some    of  which
  1012.        are updated occasionally.  You could use    _n_c_f_t_p to help you
  1013.        out by setting the appropriate local and     remote     directo-
  1014.        ries, then simply doing:
  1015.  
  1016.         get    *
  1017.  
  1018.        The  program  will skip over the    old files, and only down-
  1019.        load the    files that you don't have or  have  been  updated
  1020.        since the last time.
  1021.  
  1022.        Nonetheless,  you  may want to ignore the program's advice
  1023.        and download a file anyway, despite the program's thinking
  1024.        that  you don't need to.     You can use the ``-f''    flag with
  1025.        _g_e_t to force a download:
  1026.  
  1027.         get    -f README
  1028.  
  1029.        You may also need to use    the ``-C'' flag    to force the pro-
  1030.        gram  to     continue downloading where it left off.  I some-
  1031.        times call that feature ``forced     reget''  for  historical
  1032.        reasons.
  1033.  
  1034.        You  can    also turn off _w_i_l_d_c_a_r_d _m_a_t_c_h_i_n_g    with _g_e_t by using
  1035.        the ``-G'' flag.     Other _F_T_P programs used the syntax
  1036.  
  1037.         get    remote-file [local-file]
  1038.  
  1039.        which allowed you to specify a local pathname for the file
  1040.        you  were  trying  to  download.      _N_c_F_T_P     differs  in that
  1041.        respect,    and if you used    the  older  programs,  you  would
  1042.        find  that the program's    _g_e_t behaves more like those other
  1043.        program's _m_g_e_t command.    This means that    in _N_c_F_T_P_,that
  1044.  
  1045.         get    file01 file02
  1046.  
  1047.        tries  to  download  remote  files  named  ``file01''  and
  1048.        ``file02.''   If    you like, you can get that older behavior
  1049.        by using    the ``-z'' flag, so:
  1050.  
  1051.  
  1052.  
  1053.  
  1054. NCEMRSoft              2.3.0                   16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. NcFTP(1)                         NcFTP(1)
  1061.  
  1062.  
  1063.         get    -z file01 ../junk/files/01.txt
  1064.  
  1065.        would   get   ``file01''      and    use   the   local    name
  1066.        ``../junk/files/01.txt.''
  1067.  
  1068.        Another thing that _g_e_t does is that you can use the ``-n''
  1069.        flag to fetch files that    are a certain number of    days  old
  1070.        or  newer.  If you just want to get the newest files at an
  1071.        archive,    you don't have to use a     full  mirror.     You  can
  1072.        just  say  ``download  all  files  that    are 3 days old or
  1073.        newer.''     Do that by going to a directory, and trying:
  1074.  
  1075.         get    -n 3 *
  1076.  
  1077.        The program also    has ``reget'' mode  built  into     the  _g_e_t
  1078.        command.      Other     FTP  programs    provided a _r_e_g_e_t command,
  1079.        which was useful    when you lost a    connection during a down-
  1080.        load.   Instead    of  the     remote    host resending the entire
  1081.        file, you could use the    _r_e_g_e_t  command    to  continue  the
  1082.        transfer    where it was cut off.
  1083.  
  1084.        _N_c_F_T_P  has  this     capability built-in, and it examines the
  1085.        date and    size of    the remote file    and local file to  deter-
  1086.        mine if the program should continue where it left off last
  1087.        time.  If the dates are the same, but the  local     file  is
  1088.        smaller,    the program attempts to    ``reget.''
  1089.  
  1090.        The  last,  and    most wasteful feature of _g_e_t is    recursive
  1091.        mode, which is turned on    with the ``-R''    flag.  This  fea-
  1092.        ture  lets  you    download  an entire directory's    contents,
  1093.        i.e.:
  1094.  
  1095.         get    -R /pub/info/help
  1096.  
  1097.        That creates a directory    called ``./help'' in the  current
  1098.        local  directory,  and copies all files and subdirectories
  1099.        into it.
  1100.  
  1101.        Please use some discretion with this feature.  If you  get
  1102.        a  large     directory,  you could really bog down the remote
  1103.        host.  Archive administrators are providing a public  ser-
  1104.        vice, so    don't abuse the    archive    so much    that they have to
  1105.        shut down public    access because the  real  users     of  that
  1106.        archive can't get their work done.
  1107.  
  1108. MMAACCRROOSS
  1109.        The  program  has  a simple macro/alias facility.  You can
  1110.        use macros to roll your own commands, or     do  things  when
  1111.        certain events happen.
  1112.  
  1113.        To use macros, you will need to create and edit the _m_a_c_r_o_s
  1114.        file in your _._n_c_f_t_p subdirectory    of your     home  directory.
  1115.        Your  _~_/_._n_c_f_t_p  directory is created for    you automatically
  1116.        the first time you run the program, but you have     to  make
  1117.  
  1118.  
  1119.  
  1120. NCEMRSoft              2.3.0                   17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. NcFTP(1)                         NcFTP(1)
  1127.  
  1128.  
  1129.        the  _m_a_c_r_o_s  file  yourself  since most users won't have    a
  1130.        need for    them.
  1131.  
  1132.        You can have any    number of macros.  The syntax is:
  1133.  
  1134.         macro macro-name
  1135.         macro-body...
  1136.         end
  1137.  
  1138.        Here's a    simple macro that users    of the    old  _f_t_p  program
  1139.        might appreciate:
  1140.  
  1141.         macro binary
  1142.         type i
  1143.         end
  1144.  
  1145.        You could run that macro    simply by running the program and
  1146.        typing the macro    name as    if it were a regular  _n_c_f_t_p  com-
  1147.        mand.
  1148.  
  1149.        Macros  can  also  have    parameters,  much  like     the _K_o_r_n
  1150.        _S_h_e_l_l's shell functions and the _C_-_S_h_e_l_l's aliases.   These
  1151.        parameters  are sent to your macro, and if your macro uses
  1152.        the appropriate ``dollar'' variables, they  are    expanded.
  1153.        To illustrate, try this macro:
  1154.  
  1155.         macro cdls
  1156.         cd $1
  1157.         ls
  1158.         end
  1159.  
  1160.        To run that macro, open a connection and    try:
  1161.  
  1162.         cdls /pub
  1163.  
  1164.        That  would  try     to  _c_d    to /pub, and then try to list its
  1165.        contents    with _l_s.
  1166.  
  1167.        Dollar variables    are somewhat like those    in the _B_o_u_r_n_e and
  1168.        _K_o_r_n shells.  Example syntax:
  1169.  
  1170.         $4       :  Argument 4
  1171.         $*       :  All arguments.
  1172.         $@       :  All arguments, each of them surrounded by    double quotes.
  1173.         $(2-5) :  Arguments    2, 3, 4, and 5.
  1174.         $(2,5) :  Arguments    2 and 5.
  1175.         $(3+)  :  Arguments    3, 4, 5, ..., N.
  1176.  
  1177.        A better    way to code the    ``cdls'' macro might be:
  1178.  
  1179.         macro cdls
  1180.         cd $1
  1181.         ls $(2+)
  1182.         end
  1183.  
  1184.  
  1185.  
  1186. NCEMRSoft              2.3.0                   18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. NcFTP(1)                         NcFTP(1)
  1193.  
  1194.  
  1195.        There  are some special macros, which I call _e_v_e_n_t _m_a_c_r_o_s.
  1196.        The program looks for macros by special names, and if they
  1197.        exist, runs the macro when that event happens.
  1198.  
  1199.        One  event macro    is the _._s_t_a_r_t_._n_c_f_t_p macro.  If you have    a
  1200.        macro by    that name defined in your macros file,    the  pro-
  1201.        gram will run that macro    each time you run the program.
  1202.  
  1203.        Similarly,  there  is also a _._q_u_i_t_._n_c_f_t_p    macro that is run
  1204.        each time you quit the program.
  1205.  
  1206.        Another set of event macros are site-specific.  For  exam-
  1207.        ple,  if     I  have a site    bookmarked as ``typhoon'' I could
  1208.        then define macros named    _._o_p_e_n_._t_y_p_h_o_o_n and  _._c_l_o_s_e_._t_y_p_h_o_o_n
  1209.        which would run each time I opened and closed ``typhoon.''
  1210.  
  1211.        Another,     more  generic    set  of     event    macros    are   the
  1212.        _._o_p_e_n_._a_n_y  and  _._c_l_o_s_e_._a_n_y macros which run when    I open or
  1213.        close any site.    One possible use for these macros  is  to
  1214.        run separate shell scripts to do    some processing    after you
  1215.        finish using a site.  I could have a macro like this:
  1216.  
  1217.         macro .quit.ncftp
  1218.         echo "Started post-processing downloads    at %H:%M:%S"
  1219.         !sh ~/scripts/download-decoder
  1220.         echo "Finished post-processing downloads at %H:%M:%S"
  1221.         end
  1222.  
  1223.        Another use is to duplicate the old _m_a_c_d_e_f _i_n_i_t hack  that
  1224.        the  traditional    _f_t_p program used in its    _._n_e_t_r_c file.  For
  1225.        example:
  1226.  
  1227.         macro .open.infomac
  1228.         echo "Getting recent files list"
  1229.         get -z /pub/info-mac/help/recent-files ~/docs/recent
  1230.         ls -lrt
  1231.         end
  1232.  
  1233. UUSSIINNGG CCOOLLOONN MMOODDEE
  1234.        The _c_o_l_o_n_-_m_o_d_e feature is used from your     shell's  command
  1235.        line.
  1236.  
  1237.        In ancient times, way back during the Disco Era,    you could
  1238.        use a program called _t_f_t_p to fetch a file using the Inter-
  1239.        net  standard  _T_r_i_v_i_a_l  _F_i_l_e _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l_.    You could
  1240.        use that    program    to do something    like this from within its
  1241.        shell:
  1242.  
  1243.         get    wuarchive.wustl.edu:/graphics/gif/README
  1244.  
  1245.        and that    would call wuarchive and fetch the README file.
  1246.  
  1247.        You  can     use  this program to do the same thing    from your
  1248.        shell's command line:
  1249.  
  1250.  
  1251.  
  1252. NCEMRSoft              2.3.0                   19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. NcFTP(1)                         NcFTP(1)
  1259.  
  1260.  
  1261.         csh> ncftp wuarchive.wustl.edu:/graphics/gif/README
  1262.         csh> head README
  1263.  
  1264.        This tells your shell, in this case  the     _C_-_s_h_e_l_l  to  run
  1265.        _N_c_F_T_P,    which    would    open   wuarchive,  fetch  /graph-
  1266.        ics/gif/README and write    the file /README in  the  current
  1267.        working directory, and then exits.
  1268.  
  1269.        The _c_o_l_o_n_-_m_o_d_e feature is nice if you don't want    to browse
  1270.        around the remote site, and  you     know  exactly    want  you
  1271.        want.   It also comes in    handy in shell scripts,    where you
  1272.        don't want to enter the command shell, and might    not  want
  1273.        the program to spew output.
  1274.  
  1275.        You  can     use  the _U_n_i_f_o_r_m _R_e_s_o_u_r_c_e _L_o_c_a_t_o_r standard also.
  1276.        For example, this would work:
  1277.  
  1278.         csh> ncftp ftp://wuarchive.wustl.edu/graphics/gif/README
  1279.  
  1280.        There are times where you might not want     the  program  to
  1281.        write  a    _c_o_l_o_n_-_m_o_d_e file    in the current working directory,
  1282.        or perhaps you want to pipe the output of  a  remote  file
  1283.        into  something    else.  _C_o_l_o_n_-_m_o_d_e has options to do this.
  1284.        It was inspired by the  guy  who     wrote    the  _f_t_p_c_a_t  perl
  1285.        script.     The  ``-c'' option tells the program to write on
  1286.        the standard output stream.  The    ``-m'' option  pipes  the
  1287.        file into your pager (like _m_o_r_e)    Of course this won't work
  1288.        if the thing you    give _c_o_l_o_n_-_m_o_d_e     is  a    directory!   This
  1289.        example just dumps a remote file    to stdout:
  1290.  
  1291.         csh> ncftp -c wuarc:/graphics/gif/README
  1292.  
  1293.        This  example  redirects     a  remote  file into a    different
  1294.        location:
  1295.  
  1296.         csh> ncftp -c wu:/README > ~pdietz/thesis.tex
  1297.  
  1298.        This one    shows how to use a pipeline:
  1299.  
  1300.         csh> ncftp -c wuarc:/README    | tail | wc -l
  1301.         10
  1302.         csh>
  1303.  
  1304.        This shows how to page a    remote file:
  1305.  
  1306.         csh> ncftp -m wuarc:/graphics/gif/README
  1307.  
  1308. UUSSIINNGG LLIINNEE MMOODDEE
  1309.        The only    reason I provide _l_i_n_e _m_o_d_e is so that the  primi-
  1310.        tive  operating systems whose _c_u_r_s_e_s library is missing or
  1311.        dysfunctional won't render the program completely useless.
  1312.  
  1313.        exceptions of the functions that    require    _v_i_s_u_a_l _m_o_d_e, such
  1314.        as the _P_r_e_f_e_r_e_n_c_e_s screen and the  _B_o_o_k_m_a_r_k  _E_d_i_t_o_r.   You
  1315.  
  1316.  
  1317.  
  1318. NCEMRSoft              2.3.0                   20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. NcFTP(1)                         NcFTP(1)
  1325.  
  1326.  
  1327.        will    have    to    edit    the    _~_/_._n_c_f_t_p_/_p_r_e_f_s    and
  1328.        _~_/_._n_c_f_t_p_/_b_o_o_k_m_a_r_k_s file manually, with a    text editor.
  1329.  
  1330.        As a small consolation, you get to  use    the  full-powered
  1331.        line-editing  libraries,     like  _G_N_U  _R_e_a_d_l_i_n_e if    they were
  1332.        compiled    with the program.
  1333.  
  1334. SSUUMMMMAARRYY    OOFF CCOOMMMMAANNDD LLIINNEE    OOPPTTIIOONNSS
  1335.        When you    invoke the program from     your  shell,  there  are
  1336.        ``dash  flags''    you  can use like you can with most other
  1337.        _U_N_I_X programs.
  1338.  
  1339.        Here's a    list of    options    you  can  use  from  the  command
  1340.        line:
  1341.  
  1342.  
  1343.         -D : Turns on debugging mode and tracing.
  1344.         -V : Uses ``visual'' mode for this session.
  1345.         -L : Uses ``line mode'' for    this session.
  1346.         -H : Prints    the information    from the ``version'' command and exits.
  1347.  
  1348.        When  you  turn    on tracing, the    program    writes a log with
  1349.        debugging information to     a  file  called  _t_r_a_c_e     in  your
  1350.        _._n_c_f_t_p  subdirectory  of    your home directory.  If you need
  1351.        to report a bug,    it would be helpful to mail me the  _t_r_a_c_e
  1352.        file so I can track it down better.
  1353.  
  1354.        In  addition  to    the program flags, you can also    use flags
  1355.        from the    _o_p_e_n and _g_e_t commands with  a  _c_o_l_o_n  _m_o_d_e  path.
  1356.        Here's a    really complex example:
  1357.  
  1358.         csh> ncftp -r -d 120 -n 3 sphygmomanometer.unl.edu:/pub/stuff/*
  1359.  
  1360.        This  tries  redialing  that  host  every two minutes, and
  1361.        fetching    all files from the ``/pub/stuff'' directory  that
  1362.        are 3 days old or newer.
  1363.  
  1364. AAUUTTHHOORR
  1365.        _N_c_F_T_P  was  written  by    Mike  Gleason,    _N_C_E_M_R_S_o_f_t (mglea-
  1366.        son@probe.net).    _N_c_F_T_P is copyrighted 1995  by  NCEMRSoft.
  1367.        All rights reserved.
  1368.  
  1369.        As of this writing, the most recent version is archived in
  1370.        /pub/ncftp, on _f_t_p_._p_r_o_b_e_._n_e_t.
  1371.  
  1372. TTHHAANNKKSS
  1373.        Ideas and some code contributed by my partner, Phil Dietz,
  1374.        _N_C_E_M_R_S_o_f_t (dietz@wtc.com).
  1375.  
  1376.        Thanks  to  everyone  who has helped test the program, and
  1377.        sent in feedback    over the years.      Your    support     is  what
  1378.        drives me to improve the    program!
  1379.  
  1380.        I'd  like  to  thank my former system administrators, most
  1381.  
  1382.  
  1383.  
  1384. NCEMRSoft              2.3.0                   21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. NcFTP(1)                         NcFTP(1)
  1391.  
  1392.  
  1393.        notably Charles Daniel, for making testing on a variety of
  1394.        platforms possible, letting me have some    extra disk space,
  1395.        and for maintaining the UNL FTP site.
  1396.  
  1397.        I also thank Dale Botkin    and Tim    Russell    at _P_r_o_b_e _T_e_c_h_n_o_l_-
  1398.        _o_g_y,  for  giving _n_c_f_t_p a home on _p_r_o_b_e_._n_e_t, the    midwest's
  1399.        best connection to the internet.
  1400.  
  1401.        For testing above and beyond the    call of    duty, I    am  espe-
  1402.        cially     grateful   to:      Phil     Dietz,      Kok    Hon   Yin
  1403.        (hkok@cse.unl.edu),      Andrey    A.      Chernov
  1404.        (ache@astral.msk.su).
  1405.  
  1406.        Thanks  to  Tim    MacKenzie (t.mackenzie@trl.oz.au) for the
  1407.        filename    completion code.
  1408.  
  1409.        Thanks to  DaviD     W.  Sanderson    (dws@ssec.wisc.edu),  for
  1410.        helping me out with the man page.
  1411.  
  1412. BBUUGGSS
  1413.        Due  to    a limitation in    the _c_u_r_s_e_s library, scrolling may
  1414.        be slow in visual mode.
  1415.  
  1416.        Shell escapes, suspending (^Z) and resuming, and    interrup-
  1417.        ing (^C)    still have quirks with _v_i_s_u_a_l _m_o_d_e.
  1418.  
  1419.        There  are  no  such  sites named _b_o_w_s_e_r_._n_i_n_t_e_n_d_o_._c_o_._j_p or
  1420.        _s_p_h_y_g_m_o_m_a_n_o_m_e_t_e_r_._u_n_l_._e_d_u.
  1421.  
  1422. SSEEEE AALLSSOO
  1423.        _f_t_p(1), _f_t_p_d(8),    _n_s_l_o_o_k_u_p(1), _a_r_c_h_i_e(1),    _r_c_p(1),     _t_f_t_p(1).
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450. NCEMRSoft              2.3.0                   22
  1451.  
  1452.  
  1453.  
  1454.