home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 033 / atcp40de.zip / NCFTP.MAN < prev    next >
Text File  |  1994-06-17  |  43KB  |  1,189 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. DDEESSCCRRIIPPTTIIOONN
  15.        _N_c_F_T_P is a user interface to the  Internet  standard  _F_i_l_e
  16.        _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l.  This program allows a user to transfer
  17.        files to and from a remote network site, and offers  addi¡
  18.        tional  features that are not found in the standard inter¡
  19.        face, _f_t_p.
  20.  
  21. FFEEAATTUURREESS
  22.        Program options will be explained later in this  document.
  23.        Let's  get  down to business and go over the features that
  24.        make this program worthwhile.
  25.  
  26.        Here is the list of section headers; I have  my  $MANPAGER
  27.        environment  variable set to use ``lleessss --ii'' so that I can
  28.        skip to the section I want (otherwise, //_r_e_g_e_x commands  to
  29.        the  pager  won't match the section headers because of the
  30.        formatting codes; the ``--ii'' can search through  the  for¡
  31.        matting codes)
  32.  
  33.             Establishing the remote connection
  34.             Format of the RC file
  35.             The Recent-sites file
  36.             Redialing a busy remote site
  37.             Supplying a sitename from your shell's command line
  38.             Using Colon-mode
  39.             Using FTP-cat and FTP-more mode
  40.             Supplying a port number with the open command
  41.             Displaying and changing program variables
  42.             Program variables
  43.             Listing a remote directory
  44.             Viewing a remote directory with your pager
  45.             Redisplaying the last directory listing
  46.             Fetching files from the remote host
  47.             Viewing a remote file with your pager
  48.             Creating a message file on the remote host
  49.             Looking up site names and addresses
  50.             Checking the configuration of the program
  51.             Using the command shell
  52.             Customizing the prompt
  53.             Keeping a log of your file transfers
  54.             Program options
  55.             A sample RC file
  56.  
  57. EEssttaabblliisshhiinngg tthhee rreemmoottee ccoonnnneeccttiioonn
  58.        Just  opening a connection to a remote server was inconve¡
  59.        nient enough in the stock _f_t_p program to  justify  writing
  60.        this  program.   Here  at  _N_C_E_M_R_S_o_f_t,  we  want  to do our
  61.  
  62.  
  63.  
  64. NCEMRSoft                                                       1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NcFTP(1)                                                 NcFTP(1)
  71.  
  72.  
  73.        business as quickly  and  painlessly  as  possible.   We'd
  74.        rather save time and wear and tear on our metacarpals than
  75.        bother typing entire  site  names,  usernames,  and  email
  76.        addresses  masquerading  as  passwords, and setting binary
  77.        mode.
  78.  
  79.        We made all connections anonymous by default, and we auto¡
  80.        matically send our email address for the password on those
  81.        connections.  We allowed for site names to be abbreviated.
  82.  
  83.        For  each  commonly accessed site, you can put an entry in
  84.        your program preferences file (let's call it the ``ncftprc
  85.        file''  or ``RC file'' for short).  To open the site, from
  86.        the command shell all you do is type:
  87.  
  88.             open wuarchive.wustl.edu
  89.  
  90.        or
  91.  
  92.             o wuarchive.wustl.edu
  93.  
  94.        As promised, you can abbreviate that  further.   Just  use
  95.        any abbreviation that would match only the site you had in
  96.        mind.  For the previous example, you could try:
  97.  
  98.             o wuarc
  99.             o wustl
  100.             o stl
  101.             o wu
  102.  
  103.        Any of those abbreviations would open  wuarchive.wustl.edu
  104.        anonymously,  sending  your  anon-password (usually set to
  105.        your email address) as the password.  Keep  in  mind  that
  106.        the  program tries opening the first site that matches the
  107.        abbreviation you supplied.  So:
  108.  
  109.             o w
  110.  
  111.        might match a site  named  bowser.nintendo.co.jp  if  that
  112.        site appeared before your entry for wuarchive.wustl.edu.
  113.  
  114.        Most  of  the  time  we open remote sites anonymously, but
  115.        there are times where you need to specifically open a site
  116.        with  an actual username and password.  Let's say my part¡
  117.        ner, Phil Dietz, wants to FTP something out of my account.
  118.        Perhaps he wants to fetch the latest version of the source
  119.        code to _N_c_F_T_P so he can optimize something or  add  a  new
  120.        feature  behind  my  back.  Since the program opens remote
  121.        sites anonymously by default  (actually,  you  can  change
  122.        this behavior; more on that later), he would have to spec¡
  123.        ify a flag to the _o_p_e_n command so he can supply  my  user¡
  124.        name and password.  He would try:
  125.  
  126.             o -u sphygmomanometer.unl.edu
  127.  
  128.  
  129.  
  130. NCEMRSoft                                                       2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NcFTP(1)                                                 NcFTP(1)
  137.  
  138.  
  139.        or, more likely:
  140.  
  141.             o -u sph
  142.  
  143.        Then  the  program would prompt him for a username (login,
  144.        whatever) and a password:
  145.  
  146.             Login Name (pdietz): mgleason
  147.             Password: ********
  148.  
  149.        If he got it right, he could raid my stuff.  If not,  he'd
  150.        probably  drop  me  an email asking me to quit changing my
  151.        password so often.
  152.  
  153.        There are even times where you want to FTP from  your  own
  154.        account,  like  if  you  are  debugging  an FTP client you
  155.        wrote.  At this prompt:
  156.  
  157.             Login Name (mgleason):
  158.  
  159.        I could just hit return to tell the program  that  I  want
  160.        ``mgleason''  as  my username, then I would enter my pass¡
  161.        word.
  162.  
  163. FFoorrmmaatt ooff tthhee RRCC ffiillee
  164.        This release of the program is  somewhat  compatible  with
  165.        the  stock  _f_t_p  program's  ..nneettrrcc  file.   However, I can
  166.        promise you that in the near future the program will use a
  167.        new format, so don't invest too much time in it.
  168.  
  169.        The  RC  file  can  be  named  ``nnccffttpprrcc'',  ``nneettrrcc'', or
  170.        ``..nnccffttpprrcc'', but it is usually named ``..nneettrrcc'' so it can
  171.        be  used  with  the stock _f_t_p program.  _N_c_F_T_P looks in the
  172.        current working directory for any of those files, and then
  173.        in  your home directory, and after that it gives up (which
  174.        is OK, because RC files aren't mandatory).
  175.  
  176.        The file usually starts with _#_s_e_t and _#_u_n_s_e_t commands that
  177.        do  things  to the programs variables.  The reason for the
  178.        ``#'' is so the stock _f_t_p program will think they are com¡
  179.        ments.   You  might  have  this appearing as the first few
  180.        lines in your RC file (I'll explain later):
  181.  
  182.             #set debug 1
  183.             #set pager "less -EMi"
  184.             #unset startup-msg
  185.  
  186.        After those, you put in machine entries for each  of  your
  187.        favorite    sites.     Let's   put   in   an   entry   for
  188.        wuarchive.wustl.edu.  First you would put:
  189.  
  190.             machine wuarchive.wustl.edu
  191.  
  192.        Then you could put in your username, password, and account
  193.  
  194.  
  195.  
  196. NCEMRSoft                                                       3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NcFTP(1)                                                 NcFTP(1)
  203.  
  204.  
  205.        if you like:
  206.  
  207.             user anonymous
  208.             password -mgleason@cse.unl.edu
  209.             account wuarc.does.not.use.accounts
  210.  
  211.        Following  that,  you  would add the startup macro that is
  212.        run each time you connect to wuarchive.  You must start it
  213.        with this line:
  214.  
  215.             macdef init
  216.  
  217.        Then put in the commands you want to do:
  218.  
  219.             cd /graphics/gif
  220.             ls -lt
  221.  
  222.        After  that,  you  end the macro with a blank line (impor¡
  223.        tant!).  The finished machine entry would  look  like  the
  224.        following.   To  make  the transition to the impending new
  225.        format less painful, I recommend you adhere to  this  for¡
  226.        mat:
  227.  
  228.             machine wuarchive.wustl.edu
  229.                   user anonymous
  230.                   password -mgleason@cse.unl.edu
  231.                   account wuarc.does.not.use.accounts
  232.                   macdef init
  233.                         cd /graphics/gif
  234.                         ls -lt
  235.                   (_m_a_n_d_a_t_o_r_y _b_l_a_n_k _l_i_n_e _t_o _e_n_d _t_h_e _m_a_c_r_o)
  236.  
  237.        Of  course, if all you want to do is open wuarchive anony¡
  238.        mously, you needn't  bother  with  the  ``user'',  ``pass¡
  239.        word'',  and  ``account'' lines.  You may want to put them
  240.        in if you plan on using the  stock  _f_t_p  program,  though.
  241.        Try something like this:
  242.  
  243.             machine wuarchive.wustl.edu
  244.                   macdef init
  245.                         cd /graphics/gif
  246.                         ls -lt
  247.                   (_m_a_n_d_a_t_o_r_y _b_l_a_n_k _l_i_n_e _t_o _e_n_d _t_h_e _m_a_c_r_o)
  248.  
  249.        You  can  tell the program to not run the startup macro if
  250.        you supply --ii to the _o_p_e_n command.
  251.  
  252.        Really, you should only bother adding  entries  for  sites
  253.        that  you want to run startup macros upon connection.  The
  254.        next section explains why.
  255.  
  256. TThhee RReecceenntt--ssiitteess ffiillee
  257.        Each time you open a site, the program saves the  name  of
  258.        the site and the last directory you were in to the _r_e_c_e_n_t_-
  259.  
  260.  
  261.  
  262. NCEMRSoft                                                       4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NcFTP(1)                                                 NcFTP(1)
  269.  
  270.  
  271.        _s_i_t_e_s _f_i_l_e which is named ..nnccrreecceenntt  and  placed  in  your
  272.        home  directory.  The program saves a predetermined number
  273.        of these sites in the file, and when it reaches the limit,
  274.        it discards the oldest entry so it can add a new one.
  275.  
  276.        You  can  just  go  ahead and use the name of the site you
  277.        want with the _o_p_e_n command  if  you  know  it  is  in  the
  278.        _r_e_c_e_n_t_-_f_i_l_e  (and  you  can abbreviate the name, just like
  279.        those in the RC file).  But if you  cannot  remember  what
  280.        the  name of the site you want, all you do is run the _o_p_e_n
  281.        command with no site parameter:
  282.  
  283.             open
  284.  
  285.        This will pop up a list of the sites in  the  _r_e_c_e_n_t_-_f_i_l_e,
  286.        and  sites in your RC file.  At the open prompt, just type
  287.        the name (or an abbreviation of that name) or  the  number
  288.        preceding  the site name to open that site.  After opening
  289.        the site you wanted, the program sets the  remote  working
  290.        directory  to  the  same one you left in the last time you
  291.        called.
  292.  
  293.        If you don't like the idea of having the sites you  called
  294.        stored  on  disk,  you  can turn this feature off using an
  295.        _u_n_s_e_t command, explained later.
  296.  
  297. RReeddiiaalliinngg aa bbuussyy rreemmoottee ssiittee
  298.        Some remote sites limit the number of leeches, er,  anony¡
  299.        mous  connections at a time to reduce the load on the host
  300.        computer.  You can use the _o_p_e_n command's  redial  feature
  301.        to  keep attempting connections until you get on, although
  302.        that is not a very polite thing to do.  The  simplest  way
  303.        to do this would be to just supply the --rr option:
  304.  
  305.             open -r wuarc
  306.  
  307.        There  are  also options you can use to tweak redial.  The
  308.        --dd flag sets the delay between dials, and the --gg flag sets
  309.        a limit on how many dials should be attempting before giv¡
  310.        ing up.  If you don't supply --gg the program  will  dial  a
  311.        day  and  forever  (which  my Number Theory professor, Dr.
  312.        Mientka, says is longer than forever and a day)  until  it
  313.        connects  successfully,  or  until you get sick of waiting
  314.        and hit the interrupt key (usually ^C).
  315.  
  316.        This example dials wuarchive every ten minutes, giving  up
  317.        after  twenty  attempts.   Note  that  the redial delay is
  318.        specified in seconds:
  319.  
  320.             open -r -d 600 -g 20 wuarc
  321.  
  322.        Please be considerate when you use redialing, so you won't
  323.        tax the network.  Site administrators can and do get angry
  324.        when they get flooded with connections.
  325.  
  326.  
  327.  
  328. NCEMRSoft                                                       5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. NcFTP(1)                                                 NcFTP(1)
  335.  
  336.  
  337. SSuuppppllyyiinngg aa ssiitteennaammee ffrroomm yyoouurr sshheellll''ss ccoommmmaanndd lliinnee
  338.        When you run the program:
  339.  
  340.             ncftp
  341.  
  342.        by itself does nothing and waits for you to type  commands
  343.        to  the program's own shell.  Just like the stock _f_t_p pro¡
  344.        gram, you can supply a site name on the command line:
  345.  
  346.             ncftp wuarchive.wustl.edu
  347.  
  348.        You can also use abbreviations as usual:
  349.  
  350.             ncftp wuarc
  351.  
  352.        This is equivalent to running the program, then issuing an
  353.        _o_p_e_n command to open wuarchive.
  354.  
  355. UUssiinngg CCoolloonn--mmooddee
  356.        The  _o_p_e_n command is not a one-trick pony.  Another option
  357.        is what I call _c_o_l_o_n_-_m_o_d_e.  This feature is used (most  of
  358.        the time) from your shell's command line.
  359.  
  360.        In ancient times, way back during the Disco era, you could
  361.        use a program called _t_f_t_p to fetch a file using the Inter¡
  362.        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
  363.        use that program to do something like this from within its
  364.        shell:
  365.  
  366.             get wuarchive.wustl.edu:/graphics/gif/README
  367.  
  368.        and that would call wuarchive and fetch the RREEAADDMMEE file.
  369.  
  370.        You  can  use  this program to do the same thing from your
  371.        shell's command line:
  372.  
  373.             csh> ncftp wuarchive.wustl.edu:/graphics/gif/README
  374.             csh> head README
  375.  
  376.        This tells your shell, in this case the ``c-shell'' to run
  377.        _N_c_F_T_P,   which   would   open   wuarchive,  fetch  //ggrraapphh¡¡
  378.        iiccss//ggiiff//RREEAADDMMEE and write the file ..//RREEAADDMMEE in the  current
  379.        working  directory,  and  then exits.  This is nice if you
  380.        don't want to browse around the remote site, and you  know
  381.        exactly  want  you  want.   It would also come in handy in
  382.        shell scripts, where you don't want to enter  the  command
  383.        shell, and might not want the program to spew output.
  384.  
  385.        You  can use _c_o_l_o_n_-_m_o_d_e to set the starting remote working
  386.        directory also:
  387.  
  388.             csh> ncftp wuarchive.wustl.edu:/graphics/gif
  389.  
  390.        This would run the program, open wuarchive, and _c_d to  the
  391.  
  392.  
  393.  
  394. NCEMRSoft                                                       6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. NcFTP(1)                                                 NcFTP(1)
  401.  
  402.  
  403.        gif directory, then run the program's command shell so you
  404.        can browse.
  405.  
  406.        _C_o_l_o_n_-_m_o_d_e is also available  from  within  the  program's
  407.        command shell.  At a prompt you can do stuff like this:
  408.  
  409.             ncftp> open wuarchive.wustl.edu:/graphics/gif/README
  410.             ncftp> o wuarc:/graphics/gif
  411.  
  412. UUssiinngg FFTTPP--ccaatt aanndd FFTTPP--mmoorree mmooddee
  413.        There  are  times  where you might not want the program to
  414.        write a _c_o_l_o_n_-_m_o_d_e file in the current working  directory,
  415.        or  perhaps  you  want to pipe the output of a remote file
  416.        into something else.  _C_o_l_o_n_-_m_o_d_e has options to  do  this.
  417.        It  was  inspired  by  the  guy  who wrote the _f_t_p_c_a_t perl
  418.        script.  The --cc option tells the program to write  on  the
  419.        standard output stream.  The --mm option pipes the file into
  420.        your pager (like _m_o_r_e) Of course this won't  work  if  the
  421.        thing  you  give  _c_o_l_o_n_-_m_o_d_e is a directory!  This example
  422.        just dumps a remote file to stdout:
  423.  
  424.             csh> ncftp -c wuarc:/graphics/gif/README
  425.             ...
  426.             csh>
  427.  
  428.        This example redirects a  remote  file  into  a  different
  429.        location:
  430.  
  431.             csh> ncftp -c wu:/README > ~pdietz/thesis.tex
  432.  
  433.        This one shows how to use a pipeline:
  434.  
  435.             csh> ncftp -c wuarc:/README | tail | wc -l
  436.             10
  437.             csh>
  438.  
  439.        This shows how to page a remote file:
  440.  
  441.             csh> ncftp -m wuarc:/graphics/gif/README
  442.             ...
  443.             csh>
  444.  
  445. SSuuppppllyyiinngg aa ppoorrtt nnuummbbeerr wwiitthh tthhee ooppeenn ccoommmmaanndd
  446.        This  option  just  didn't fit anywhere else, so to finish
  447.        out the open command, --pp lets you supply a port number  if
  448.        you  have  to _f_t_p to a site using an nonstandard port num¡
  449.        ber.  Personally, I have yet to use this feature,  but  it
  450.        is there for compatibility with the stock _f_t_p program.
  451.  
  452. DDiissppllaayyiinngg aanndd cchhaannggiinngg pprrooggrraamm vvaarriiaabblleess
  453.        Now I'll explain the commands unique to _N_c_F_T_P.  The others
  454.        should perform the same as they would  in  the  stock  _f_t_p
  455.        program;  consult  the  man  page for it if you want those
  456.        explained, or use the _h_e_l_p command for a brief blurb.
  457.  
  458.  
  459.  
  460. NCEMRSoft                                                       7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. NcFTP(1)                                                 NcFTP(1)
  467.  
  468.  
  469.        The _s_h_o_w command is used to display program variables  and
  470.        their values.
  471.  
  472.             show all
  473.  
  474.        or
  475.  
  476.             show
  477.  
  478.        would display all the variables with their values.
  479.  
  480.             show _v_a_r_1 _v_a_r_2 _._._. _v_a_r_N
  481.  
  482.        would display each specified variable and its value.
  483.  
  484.        The  _s_e_t  command changes the value of a program variable.
  485.        Its syntax is:
  486.  
  487.             set _v_a_r_n_a_m_e _v_a_l_u_e
  488.  
  489.        For Boolean or Integer variables,
  490.  
  491.             set _v_a_r_n_a_m_e
  492.  
  493.        would set the value of the variable _v_a_r_n_a_m_e to 11 (ttrruuee).
  494.  
  495.        The _u_n_s_e_t command can be used to set the variable  to  its
  496.        default  value,  or for Boolean and Integer variables, set
  497.        the value of the variable to 00 (ffaallssee).  For String  vari¡
  498.        ables,  you  can  use  this  to  set the value to an empty
  499.        string.
  500.  
  501.        You can use any of those three commands in both  the  com¡
  502.        mand shell, or in the RC file with a ``#'' prepended.
  503.  
  504. PPrrooggrraamm vvaarriiaabblleess
  505.        Each variable can be one of the following types:
  506.  
  507.        Boolean:
  508.               Can be ``oonn'' or ``ooffff'' (you can also use ``11'' or
  509.               ``00'').
  510.  
  511.        Integer:
  512.               Can be any positive or negative number, or 00.
  513.  
  514.        String:
  515.               Is a string of characters.  If the string needs  to
  516.               have  a  space  in  it,  make sure you surround the
  517.               whole string with double quotes in a _s_e_t command.
  518.  
  519.        Variables follow.  Some variables are explained  later  in
  520.        the relevant sections.
  521.  
  522.  
  523.  
  524.  
  525.  
  526. NCEMRSoft                                                       8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. NcFTP(1)                                                 NcFTP(1)
  533.  
  534.  
  535.        _a_n_o_n_-_o_p_e_n (Boolean)
  536.               Tells  whether  the default login mode is anonymous
  537.               if  on,  or  if  off,  will  prompt  for  a   user¡
  538.               name/password.   You  can  always  override this by
  539.               using either --aa or --uu with the _o_p_e_n command.
  540.  
  541.        _a_n_o_n_-_p_a_s_s_w_o_r_d (String)
  542.               Sends this as the password when  you  login  anony¡
  543.               mously.  By default this is your email address.
  544.  
  545.        _a_n_s_i_-_e_s_c_a_p_e_s (Boolean)
  546.               If on, the program can use boldface, underline, and
  547.               inverse text.
  548.  
  549.        _a_u_t_o_-_b_i_n_a_r_y (Boolean)
  550.               If on, sets the transfer type to binary mode  imme¡
  551.               diately after connection.
  552.  
  553.        _d_e_b_u_g (Integer)
  554.               Sets the debugging level.
  555.  
  556.        _g_a_t_e_w_a_y_-_l_o_g_i_n (String)
  557.               Tells which username to use when logging in to your
  558.               firewall gateway host.
  559.  
  560.        _g_a_t_e_w_a_y_-_h_o_s_t (String)
  561.               The site which is acting as your firewall  gateway,
  562.               or empty if you aren't using one.
  563.  
  564.        _l_o_c_a_l_-_d_i_r (String)
  565.               The current local working directory.  I like to set
  566.               this from my RC file, so all my files  go  into  my
  567.               download directory.
  568.  
  569.        _l_o_g_f_i_l_e (String)
  570.               The name of your personal transfer log, or empty if
  571.               you aren't using a transfer log.
  572.  
  573.        _l_o_g_s_i_z_e (Integer)
  574.               The maximum ceiling of your log  file,  before  the
  575.               program removes old entries.
  576.  
  577.        _m_p_r_o_m_p_t (Boolean)
  578.               If on, prompts for each remote file expanded from a
  579.               wildcard globbing expression.
  580.  
  581.        _n_e_t_r_c (String, Read-only)
  582.               Tells you the name of the RC file in use.
  583.  
  584.        _p_a_g_e_r (String)
  585.               The pathname and flags of the program used to  dis¡
  586.               play  output  one screenful at a time.  The default
  587.               is the value of your $PAGER environment variable.
  588.  
  589.  
  590.  
  591.  
  592. NCEMRSoft                                                       9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. NcFTP(1)                                                 NcFTP(1)
  599.  
  600.  
  601.        _p_r_o_m_p_t (String)
  602.               The prompt  specification  that  expands  into  the
  603.               prompt.
  604.  
  605.        _p_r_o_g_r_e_s_s_-_r_e_p_o_r_t_s (Integer)
  606.               Which progress meter to use, or 00 if you don't want
  607.               progress reports during file transfers.  Set it  to
  608.               11  for a simple percentage meter; 22 for a fancy bar
  609.               graph indicator; 33 to  print  just  the  number  of
  610.               kilobytes  transferred;  or  44 to print one dot for
  611.               each 10% transferred, if you want to avoid the  use
  612.               of  backspaces.   Note  that  the program may use a
  613.               different meter depending on  how  cooperative  the
  614.               remote  host is, and what you have the _a_n_s_i_-_e_s_c_a_p_e_s
  615.               variable set to.
  616.  
  617.        _r_e_c_e_n_t_-_l_i_s_t (Boolean)
  618.               If on, uses and updates the _r_e_c_e_n_t_-_f_i_l_e_.
  619.  
  620.        _r_e_m_o_t_e_-_i_s_-_u_n_i_x (Boolean)
  621.               Set automatically by the program  upon  connection,
  622.               you  may need to use this in a startup macro if the
  623.               program guessed that a remote site was UNIX when it
  624.               really is not.
  625.  
  626.        _s_t_a_r_t_u_p_-_m_s_g (Boolean)
  627.               If on, prints the opening message and tip.
  628.  
  629.        _t_i_p_s (Boolean)
  630.               If  on, prints a tip on how to use the program bet¡
  631.               ter each time you run the program.
  632.  
  633.        _t_y_p_e (String)
  634.               The name of the file transfer mode in use, such  as
  635.               ``bbiinnaarryy'' or ``aasscciiii''.
  636.  
  637.        _v_e_r_b_o_s_e (String/Integer)
  638.               Controls  the  amount  of output spewed by the pro¡
  639.               gram.  You can supply either the first character of
  640.               the name of the verbosity level, or its number:
  641.  
  642.               _Quiet (-1)
  643.                      Won't  print  any  output at all, even if an
  644.                      error occurs.
  645.  
  646.               _Errors Only (0)
  647.                      No output, except when errors occur.
  648.  
  649.               _Terse (1)
  650.                      Prints errors, and useful  output  from  the
  651.                      remote host.
  652.  
  653.               _Verbose (2)
  654.                      Prints everything, even junk output from the
  655.  
  656.  
  657.  
  658. NCEMRSoft                                                      10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. NcFTP(1)                                                 NcFTP(1)
  665.  
  666.  
  667.                      remote end.
  668.  
  669. LLiissttiinngg aa rreemmoottee ddiirreeccttoorryy
  670.        The _l_s and _d_i_r commands perform in  a  similar  manner  to
  671.        those of the stock _f_t_p program.
  672.  
  673.        The  _l_s  command  sends  the FTP command ``NLST'' for you.
  674.        This command has been set so that it  defaults  to  always
  675.        listing  files  in columns (this is the --CC option given to
  676.        the UNIX _l_s command) and appending metacharacters to  each
  677.        item  name  (this  is the --FF option), so you can see which
  678.        items are directories, files,  links,  etcetera.   If  you
  679.        don't want your items columnized, you can try using the --11
  680.        option with _l_s to print one item per line.
  681.  
  682.        The _d_i_r command sends the FTP command  ``LIST''  for  you,
  683.        which  instead of printing just item names, it prints item
  684.        sizes, owners, dates, and permissions as well.  This  com¡
  685.        mand is equivalent to ``llss --ll'' on most remote systems.
  686.  
  687.        The  usage for both commands is the same.  Here is the one
  688.        for _l_s:
  689.  
  690.               llss [_-_f_l_a_g_s] [_d_i_r_e_c_t_o_r_y _a_n_d  _f_i_l_e  _n_a_m_e_s]  [_r_e_d_i_r_e_c_¡
  691.               _t_i_o_n]
  692.  
  693.        Note  that  in this program, you can supply both flags and
  694.        items to list in the same command.  The stock  version  of
  695.        _f_t_p doesn't let you do this:
  696.  
  697.             ls -lrt /info-mac/help
  698.  
  699.        Another  thing  that  the  program  does  which the others
  700.        should have done is let you supply more than one item:
  701.  
  702.             ls -lrt /info-mac/help /pub /info-mac/README
  703.  
  704.        You can also redirect the output into a file, or  pipe  it
  705.        into  something.   This example shows how to list the con¡
  706.        tents of the current remote directory, and save the output
  707.        into a file in the current local directory:
  708.  
  709.             ls -t >ls.out
  710.  
  711.        Note  that  for  this to work, there must be no whitespace
  712.        between the ``>'' and the filename, unlike your shell com¡
  713.        mand line which allows for extra whitespace.  This will be
  714.        (actually, is) fixed in a future version of the program.
  715.  
  716.        These examples show how to use a pipe:
  717.  
  718.             ls -t |tail
  719.             dir -t "|less -CM"
  720.             ls -t "|tail | wc"
  721.  
  722.  
  723.  
  724. NCEMRSoft                                                      11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. NcFTP(1)                                                 NcFTP(1)
  731.  
  732.  
  733.        Like the redirection example, there must be no  whitespace
  734.        between  the  first  pipe  character  and  the rest of the
  735.        stuff.  The trick is that it has to appear as one argument
  736.        to the commands.  The second and third examples illustrate
  737.        the use of double quotes to squeeze extra  parameters  in.
  738.        The  second  example  can be done without all that typing.
  739.        See the descriptions of the _p_d_i_r and _p_l_s commands below.
  740.  
  741. VViieewwiinngg aa rreemmoottee ddiirreeccttoorryy wwiitthh yyoouurr ppaaggeerr
  742.        Didn't you hate it when you  listed  a  remote  directory,
  743.        only  to have most of the stuff scrolled off your terminal
  744.        before you could read it?  The _p_l_s and _p_d_i_r commands  take
  745.        care  of  this  for  you.  As you might have guessed, they
  746.        perform exactly like their regular counterparts, only  you
  747.        view them with your pager.  The pager to use is controlled
  748.        by the _p_a_g_e_r program variable.
  749.  
  750. RReeddiissppllaayyiinngg tthhee llaasstt ddiirreeccttoorryy lliissttiinngg
  751.        The program saves the listing into a local buffer,  so  if
  752.        you  need to see it again (probably forgot about _p_d_i_r) you
  753.        can use the _r_e_d_i_r and _p_r_e_d_i_r commands for this.
  754.  
  755. FFeettcchhiinngg ffiilleess ffrroomm tthhee rreemmoottee hhoosstt
  756.        The _g_e_t and _m_g_e_t retrieve remote files for you.  The usage
  757.        for _g_e_t is:
  758.  
  759.             get remote-file [local-file or redirection]
  760.  
  761.        To  fetch  //ppuubb//RREEAADDMMEE  and  write  it  as  a  file  named
  762.        ..//jjuunnkk//rreeaaddmmee, try:
  763.  
  764.             get /pub/README ./junk/readme
  765.  
  766.        To fetch //ppuubb//RREEAADDMMEE and write it as ..//RREEAADDMMEE, just do:
  767.  
  768.             get /pub/README
  769.  
  770.        This lets you fetch a file using its whole  pathname,  and
  771.        write  a copy of it in the current directory, without hav¡
  772.        ing to bother  with  typing  a  local  filename.   In  the
  773.        unlikely  event that you have write permission to a direc¡
  774.        tory called //ppuubb on your local  machine,  it  would  write
  775.        ``RREEAADDMMEE'' in that directory.
  776.  
  777.        Most  of the time the file you want will be in the current
  778.        remote directory, so you can just do these:
  779.  
  780.             get README
  781.             get README ./junk/readme
  782.  
  783.        You can also use a redirection for _g_e_t, just like you  can
  784.        with  the  _l_s, _d_i_r, and _r_e_d_i_r commands.  As described ear¡
  785.        lier, you have to conform to the  format  below  for  this
  786.        release of the program:
  787.  
  788.  
  789.  
  790. NCEMRSoft                                                      12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. NcFTP(1)                                                 NcFTP(1)
  797.  
  798.  
  799.             get README >/dev/null
  800.             get README |head
  801.             get README "|head -8"
  802.             get README "|less -EMi"
  803.  
  804.        The  last  example  is  facilitated  by  the  _p_a_g_e command
  805.        described later.
  806.  
  807.        The _g_e_t command can also use a wildcard expression  in  an
  808.        attempt  to  match  exactly  one  remote  file.  I call it
  809.        ``Poor Man's File Completion.''  If you've done  a  remote
  810.        listing, and you decide you want to download a file by the
  811.        name of ``oobbnnooxxiioouussllyylloonnggppaacckkaaggeennaammee..ttaarr..ZZ'', you can  use
  812.        ``PMFC''  to  save  some keystrokes.  Choose an expression
  813.        that will only match that one file, then use it with _g_e_t:
  814.  
  815.             get obn*.Z a.tar.Z
  816.  
  817.        If your pattern was unique, _g_e_t will fetch that file only.
  818.        If  the  pattern  matched  more than one file, the program
  819.        will bitch and moan.
  820.  
  821.        The _m_g_e_t command is used to fetch many files  at  a  time.
  822.        The  difference  between _g_e_t and _m_g_e_t is that _g_e_t lets you
  823.        write only one file, but you can put  it  in  a  different
  824.        directory,  while  _m_g_e_t fetches many files, always writing
  825.        them in the current local directory.  This example fetches
  826.        several remote files at once:
  827.  
  828.             mget a.file.Z b.file.Z c.tar d.tar.Z
  829.  
  830.        The  _m_g_e_t  command, and its ugly sisters, _m_p_u_t and _m_d_e_l_e_t_e
  831.        let you use wildcard expressions.  I could have  done  the
  832.        previous example as:
  833.  
  834.             mget *.Z c.tar
  835.  
  836.        instead.  The ``m'' commands will verify each file, if you
  837.        have the program variable _m_p_r_o_m_p_t set.
  838.  
  839. VViieewwiinngg aa rreemmoottee ffiillee wwiitthh yyoouurr ppaaggeerr
  840.        If you would like to read a file on the remote host  with¡
  841.        out  saving  a copy of it on your machine, you can use the
  842.        _p_a_g_e (or _m_o_r_e if you wish) command:
  843.  
  844.             page README
  845.             page obn*README
  846.             page README.Z
  847.  
  848.        The second example show that you can use ``PMFC'' like you
  849.        can for _g_e_t_.  The third example will work also, because if
  850.        the program knows how to decompress the file, it  will  do
  851.        so  before  feeding  it to your pager.  As stated earlier,
  852.        you can change the program to use to page by  setting  the
  853.  
  854.  
  855.  
  856. NCEMRSoft                                                      13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. NcFTP(1)                                                 NcFTP(1)
  863.  
  864.  
  865.        program variable _p_a_g_e_r_.
  866.  
  867. CCrreeaattiinngg aa mmeessssaaggee ffiillee oonn tthhee rreemmoottee hhoosstt
  868.        Use  the  _c_r_e_a_t_e  an empty file on the remote site.  Some¡
  869.        times it is necessary to leave a note if you can't get  in
  870.        touch  with  the remote site's administrator.  For example
  871.        if a file is corrupted, you could try:
  872.  
  873.             create Foo.tar_is_corrupt
  874.  
  875.        in hopes that the original uploader will replace it.
  876.  
  877. LLooookkiinngg uupp ssiittee nnaammeess aanndd aaddddrreesssseess
  878.        You can use the program's builtin mini-_n_s_l_o_o_k_u_p  facility.
  879.        If  you wanted to know the site's IP number, but only knew
  880.        the name you could do:
  881.  
  882.             lookup cse.unl.edu
  883.  
  884.        This would spit out IP number for that site, in this  case
  885.        ``129.93.1.12''.  If you needed to know what a site's name
  886.        was, but only knew the IP number, try:
  887.  
  888.             lookup 129.93.1.12
  889.  
  890.        This would spit out the name for that site, in  this  case
  891.        ``cse.unl.edu''.
  892.  
  893. CChheecckkiinngg tthhee ccoonnffiigguurraattiioonn ooff tthhee pprrooggrraamm
  894.        Use  the  _v_e_r_s_i_o_n command to print version and compilation
  895.        information about the program.  This will  also  tell  you
  896.        which  optional  features  are  compiled into the program,
  897.        such as logging to the system log and which  command  line
  898.        editor (if any) has been installed.
  899.  
  900.        The  author's  email address is listed, and if you need to
  901.        report something, send the output of  this  command  along
  902.        with your message.
  903.  
  904. UUssiinngg tthhee ccoommmmaanndd sshheellll
  905.        Just  like  the stock _f_t_p program, you type commands to it
  906.        until you get bored and hit either ^D  or  type  the  _q_u_i_t
  907.        command.
  908.  
  909.        The program supports links to popular command line editing
  910.        libraries.  If the person who  compiled  it  went  to  the
  911.        effort,  you  will  be  able to edit the command line with
  912.        arrow keys and other editing commands, and also scroll  up
  913.        and  down in the command line history, usually with the up
  914.        and down arrows.  You can check the _v_e_r_s_i_o_n command to see
  915.        if either ``GETLINE'' or ``READLINE'' are installed.
  916.  
  917. CCuussttoommiizziinngg tthhee pprroommpptt
  918.        You  can  set  the  shell's  prompt string to whatever you
  919.  
  920.  
  921.  
  922. NCEMRSoft                                                      14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. NcFTP(1)                                                 NcFTP(1)
  929.  
  930.  
  931.        like.  You can use several metacharacters that expand into
  932.        something  each  prompt.   The  ``%%''  flags are passed to
  933.        _s_t_r_f_t_i_m_e(3), so you can put the date or time in the prompt
  934.        formatted as you like it:
  935.  
  936.             set prompt "%I:%M ncftp>"
  937.  
  938.        That would insert the current time in the prompt.
  939.  
  940.        The  ``@@''  flags  are  expanded  by  the  program itself.
  941.        Here's the list of them.
  942.  
  943.        If you have an ANSI-compatible terminal, or you  have  the
  944.        program variable _a_n_s_i_-_e_s_c_a_p_e_s set, you can use @@BB, @@II, and
  945.        @@UU to  turn  on  boldface,  inverse,  and  underline  text
  946.        respectively  (otherwise they won't insert anything).  You
  947.        can also use @@RR to turn on  inverse  (reverse)  text.   @@PP
  948.        sets the text back to plain text.
  949.  
  950.        @@DD  Inserts the full path of the current remote directory.
  951.        The @@JJ flag is similar except it inserts only  the  direc¡
  952.        tory name.
  953.  
  954.        @@HH  Inserts  the  name of the remote host.  @@CC inserts the
  955.        host and current directory path in _c_o_l_o_n_-_m_o_d_e format, such
  956.        as  ``cse.unl.edu:/pub/mgleason'', or ``(not connected)''.
  957.        The  @@cc   flag   is   similar,   only   it   will   insert
  958.        ``cse.unl.edu:/pub/mgleason''  and a newline if connected,
  959.        otherwise it prints nothing.  The default prompt uses this
  960.        flag  to  print a two line prompt when connected and a one
  961.        line prompt when not connected.
  962.  
  963.        @@EE or @@!!  inserts the  event  number  (how  many  commands
  964.        you've typed).
  965.  
  966.        @@MM  inserts  ``(Mail) '' if mail has arrived since running
  967.        the program.
  968.  
  969.        @@NN inserts a newline character.
  970.  
  971. KKeeeeppiinngg aa lloogg ooff yyoouurr ffiillee ttrraannssffeerrss
  972.        You can have the program keep a personal log file.  I find
  973.        it  is  useful so I can see where I got a certain file, or
  974.        what the name of that site was I called two weeks ago.
  975.  
  976.        To use a log, add:
  977.  
  978.             #set logfile ~/.ftplog
  979.  
  980.        (or whatever you want to name the log) to your RC file.  I
  981.        don't  want  my  log growing too large and using up all my
  982.        disk space, so I also have:
  983.  
  984.             #set logsize 10240
  985.  
  986.  
  987.  
  988. NCEMRSoft                                                      15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. NcFTP(1)                                                 NcFTP(1)
  995.  
  996.  
  997.        in my RC file.  If you set the limit on  the  maximum  log
  998.        size,  the program will keep the log file at or below that
  999.        size, discarding old entries.
  1000.  
  1001.        Note that this is different from having SYSLOG  appear  in
  1002.        the  _v_e_r_s_i_o_n  command's  output.   When  this  is on, your
  1003.        actions are recorded to the system  log,  so  your  system
  1004.        administrator  can  make  sure  you  aren't doing anything
  1005.        ``bad.''
  1006.  
  1007. PPrrooggrraamm ooppttiioonnss
  1008.        Remember that you can treat the command line like an  _o_p_e_n
  1009.        command,  so  all lowercase options are passed to the _o_p_e_n
  1010.        command, and the uppercase options are handled by the main
  1011.        program.  The uppercase options are described below; refer
  1012.        to the _o_p_e_n command for descriptions of its options.
  1013.  
  1014.        --DD _x   sets the debugging level to _x.
  1015.  
  1016.        --HH     runs the _v_e_r_s_i_o_n command and exits, so you can save
  1017.               the  output  of  it to use when you need to mail me
  1018.               something.
  1019.  
  1020.        --II     toggles the mprompt variable; this is provided  for
  1021.               compatibility with ``ffttpp --ii''.
  1022.  
  1023.        --NN     disables  reading  of the RC file; this is provided
  1024.               for compatibility with ``ffttpp --nn''.
  1025.  
  1026.        --VV _x   sets verbosity to level _x (--11, 00, 11, 22) or  (qquuiieett,
  1027.               eerrrrss,  tteerrssee, vveerrbboossee).  See the description of the
  1028.               _v_e_r_b_o_s_e program variable for more information.
  1029.  
  1030.        Here are some  example  command  lines.   Again,  see  the
  1031.        description of the _o_p_e_n command (especially _c_o_l_o_n_-_m_o_d_e and
  1032.        _F_T_P_-_c_a_t _m_o_d_e) and all its functions for more  information.
  1033.  
  1034.        This just enters the _N_c_F_T_P command shell:
  1035.  
  1036.             csh> ncftp
  1037.  
  1038.        This fetches CCOONNTTEENNTTSS and then quits:
  1039.  
  1040.             csh> ncftp cse.unl.edu:/pub/mgleason/CONTENTS
  1041.  
  1042.        Some  others  examples, with open options and main program
  1043.        options mixed in:
  1044.  
  1045.             csh> ncftp -V quiet -u ftp.unl.edu
  1046.             csh> ncftp -c cse.unl.edu:/pub/mgleason/CONTENTS
  1047.             csh> ncftp -D 2 -r -d 120 -g 10 -N ftp.unl.edu
  1048.  
  1049. AA ssaammppllee RRCC ffiillee
  1050.        Here is a sample RC file:
  1051.  
  1052.  
  1053.  
  1054. NCEMRSoft                                                      16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. NcFTP(1)                                                 NcFTP(1)
  1061.  
  1062.  
  1063.             #set logfile ~/.ftplog
  1064.             #set progress-reports 2
  1065.             #set local-dir /usr/tmp/zz
  1066.             #set prompt "@B@E @UNcFTP@P @B@M@D@P ->"
  1067.  
  1068.             machine sumex-aim.stanford.edu
  1069.                   macdef init
  1070.                         cd /info-mac
  1071.                         get ./help/recent-files.txt "|grep -v '.abs' > sumex"
  1072.                         !less sumex
  1073.                         pwd
  1074.  
  1075.             # This site is in here just so I can use ``apple''
  1076.             # as an abbreviation.
  1077.             machine ftp.apple.com
  1078.  
  1079.             # NcFTP will only ask for your password:
  1080.             machine cse.unl.edu
  1081.                   login mgleason
  1082.  
  1083.             # You can supply a login and a password:
  1084.             machine fake.machine.unl.edu
  1085.                   login mgleason
  1086.                   password mypass
  1087.                   macdef init
  1088.                   cd ./foo/bar
  1089.  
  1090.             # If an antiquated non-UNIX machine doesn't use
  1091.             # the "SYST" command, you may need to unset
  1092.             # remote-is-unix, if the remote host complains
  1093.             # about ``ls -CF''.
  1094.             machine some.vms.unl.edu
  1095.                   macdef init
  1096.                   unset remote-is-unix
  1097.  
  1098.  
  1099. AAUUTTHHOORRSS
  1100.        _N_c_F_T_P was  written  by  Mike  Gleason,  _N_C_E_M_R_S_o_f_t  (mglea¡
  1101.        son@cse.unl.edu),  and based on code by the authors of the
  1102.        _f_t_p from the BSD 4.3 distribution.  _N_c_F_T_P  is  copyrighted
  1103.        1992,  1993  by NCEMRSoft and 1985, 1989 by the Regents of
  1104.        California.
  1105.  
  1106.        Ideas and some code contributed by Phil  Dietz,  _N_C_E_M_R_S_o_f_t
  1107.        (pdietz@cse.unl.edu).   Testing and debugging done by Phil
  1108.        and Kok Hon Yin (hkok@cse.unl.edu).
  1109.  
  1110.        Extensive man page formatting work by DaviD  W.  Sanderson
  1111.        (dws@ssec.wisc.edu).
  1112.  
  1113. BBUUGGSS
  1114.        Correct  execution  of  many  commands depends upon proper
  1115.        behavior by the remote server.
  1116.  
  1117.  
  1118.  
  1119.  
  1120. NCEMRSoft                                                      17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. NcFTP(1)                                                 NcFTP(1)
  1127.  
  1128.  
  1129.        The remote server may drop the connection if  you  take  a
  1130.        long time to page remote files.
  1131.  
  1132.        Termcap padding is not correctly displayed.
  1133.  
  1134.        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
  1135.        _s_p_h_y_g_m_o_m_a_n_o_m_e_t_e_r_._u_n_l_._e_d_u.
  1136.  
  1137. SSEEEE AALLSSOO
  1138.        _s_t_r_f_t_i_m_e(3), _f_t_p_d(8),  _f_t_p(1),  _n_s_l_o_o_k_u_p(1),  _c_o_m_p_r_e_s_s(1),
  1139.        _g_z_i_p(1), _z_c_a_t(1), _f_s_p(1), _a_r_c_h_i_e(1), _t_f_t_p(1).
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186. NCEMRSoft                                                      18
  1187.  
  1188.  
  1189.