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

  1.  
  2.  
  3.  
  4. NcFTP(1)                         NcFTP(1)
  5.  
  6.  
  7. NAME
  8.        NcFTP - Internet    file transfer program
  9.  
  10. SYNOPSIS
  11.        ncftp    [program    options]    [[open     options]   host-
  12.        name[:pathname]]
  13.  
  14. OPTIONS
  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. DESCRIPTION
  38.        NcFTP  is  a  user interface to the Internet standard File
  39.        Transfer    Protocol.  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, ftp.
  43.  
  44.        The  program runs in one    of three modes:    visual mode, line
  45.        mode, and colon mode.
  46.  
  47.        If your system is somewhat modern, the default mode should
  48.        be visual mode.    This is    a full-screen interface    that uses
  49.        the curses 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    line mode
  54.        for  the    interactive shell.  This mode is a no-frills com-
  55.        mand-line interface that    will look like    the  default  ftp
  56.        program's command shell.
  57.  
  58.        The  third mode,    colon mode, 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. INTRODUCTION TO    VISUAL MODE
  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 Internet Protocol    (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 open 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 University of Nebraska.  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 FTP Protocol'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 ls and    dir 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  cd 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 Bourne
  127.  
  128.  
  129.  
  130. NCEMRSoft              2.3.0                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NcFTP(1)                         NcFTP(1)
  137.  
  138.  
  139.        and Korn    shell.
  140.  
  141.        The purpose of the program is to    exchange data with  other
  142.        systems.      You can use the program's get    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 put 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 quit    command    to terminate  the
  160.        program.
  161.  
  162. THE BOOKMARKS FILE
  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 bookmarks file, which    is stored in  the  .ncftp
  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 Nethack 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. USING THE BOOKMARK EDITOR
  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    bookmarks 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 /ed command.     Doing that brings up another screen with
  272.        the settings for    that bookmark.
  273.  
  274.        In the Bookmark Options 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. BOOKMARK OPTIONS
  281.        Edit the    Bookmark name 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.        User, Password, and Account 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 Directory 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 Transfer Type field can be changed to use a    different
  306.        translation mode    when transferring files.  This program is
  307.        usually running on a UNIX system, and most remote  systems
  308.        are  also  UNIX    variants, so the default transfer type is
  309.        binary, which does no translation at all.
  310.  
  311.        However,    when you need to work with plain text  files  and
  312.        transfer     them  between    non-UNIX  systems, you can change
  313.        this to ASCII.  That will  guarantee  that  the    text-only
  314.        files will translate correctly.    Most often, you    will need
  315.        to use the binary transfer type.
  316.  
  317.        The Port    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  Has     SIZE  Command field will probably not need to be
  323.        edited.    This field is mostly for your  information  only.
  324.        The  SIZE  command  is  an  FTP    Protocol 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  Has     MDTM  Command 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 Can Use Passive FTP field specifies whether the remote
  348.        server  allows  use  of    the  FTP Protocol's PASV command.
  349.        There are two ways to set up FTP    connections.  The default
  350.        way is what I call Port FTP.  Unfortunately, Port FTP can-
  351.        not be used when    your local host    is hiding behind a  Fire-
  352.        wall.  Passive FTP 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 Operating System 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 UNIX, the ls  command    tries  to
  362.        use  the    -CF flags, like    you could with ``/bin/ls -CF'' on
  363.        UNIX.  If the OS    wasn't UNIX, 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. PREFERENCES
  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  prefs command from
  380.        within the program.
  381.  
  382.        The Default open    mode  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 anonymous.   You
  385.        might  want  to    set  this field    to user    & password 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 anonymous 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  Anonymous  password     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 Blank lines between cmds    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.        ~/.ncftp/log,  you  can    set  the User log size 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 Max bookmarks to save 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  pager  program  to
  437.        view large amounts of text.  For    example, the page 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 pager field.
  441.  
  442.        When you    transfer files between the remote host    and  your
  443.        local  host, the    program    uses a progress    meter 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 Progress meter field.
  447.  
  448.        You can control how much    of the remote server's chatter is
  449.        printed    by  changing the Remote    messages 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  startup message.  Typically, when you
  454.        connect to a server  it    has  some  important  information
  455.        about the server.  Some servers have chdir messages, 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 Remote
  470.        messages    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 Startup in Local
  478.        Dir 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 Startup
  484.        messages    field to specify whether the program  prints  its
  485.        ``splash     screen''  and    whether    it prints a tip    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 File timestamps field.
  492.  
  493.        If  you    don't  like the    full-screen graphics, you can use
  494.        the line-oriented mode by  changing  the     Screen     graphics
  495.        field.  Once you    turn visual mode off from the Preferences
  496.        screen, you won't be able to get    back to     the  preferences
  497.        screen  again  when  using  line     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. COMMAND    REFERENCE
  504.        I  will    now describe the commands that the program's com-
  505.        mand shell supports.  The first command to know    is  help.
  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 open 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 cd 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 get, put,    and ls could be     used  to
  556.        refer to    items in that directory.
  557.  
  558.        Some shells in the UNIX 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  close 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     create     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 debug 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 trace 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 ~/.ncftp/trace file, which
  613.        would also have the version information in it.
  614.  
  615.        The dir command prints a    detailed directory  listing.   It
  616.        tries  to  behave  like UNIX's ``/bin/ls    -l'' command.  If
  617.        the remote server seems to be a UNIX host,  you    can  also
  618.        use the same flags you would with ls, for instance
  619.  
  620.         dir    -rt
  621.  
  622.        would try to act    like
  623.  
  624.         /bin/ls -lrt
  625.  
  626.        would on    UNIX.
  627.  
  628.        The  echo 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     UNIX  shell, but
  631.        accepts some extra flags.  All ``percent'' flags     are  fed
  632.        through strftime(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  get     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 get command    has  some  powerful  features  which  are
  677.        described below,    in ``SPECIAL DOWNLOADING FEATURES.''
  678.  
  679.        The  bookmarks  command    runs  the  Bookmark  Editor.  You
  680.        already know how    what that does,    since you read    the  sec-
  681.        tion above on it, right?
  682.  
  683.        The  lcd    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  lcd
  687.        to change to that directory and then do your downloads.
  688.  
  689.        Another    local command that comes in handy is the lls 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 lls    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 lookup 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 IP 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 lpage 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  lpwd  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 ls command prints a brief directory listing.     It tries
  758.        to behave like UNIX's ``/bin/ls    -CF''  command.      If  the
  759.        remote  server  seems  to be a UNIX host, you can also use
  760.        the same    flags you would    with ls, for instance
  761.  
  762.         ls -rt
  763.  
  764.        would try to act    like
  765.  
  766.         /bin/ls -CFrt
  767.  
  768.        would on    UNIX.
  769.  
  770.        The mkdir 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 open    command    connects you  to  a  remote  host.   Many
  775.        times,  you  will  simply  open    a  host    without    using any
  776.        flags, but nonetheless the open command has some    flags  to
  777.        enable certain features.
  778.  
  779.        To  force  an anonymous open, use the ``-a'' flag.  On the
  780.        ftp.probe.net machine, which is the official archive  site
  781.        for  NcFTP, I have a need to use    both anonymous logins and
  782.        user logins.  The Bookmark Editor 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    Bookmark Editor    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 wuarchive.wustl.edu 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 open    command    will run the Bookmark Editor if    you don't
  823.        supply a    hostname to open.  You can use the Bookmark  Edi-
  824.        tor  to    select    a  host    and open it by hitting the return
  825.        key.
  826.  
  827.        The page    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 pager field in    the Pref-
  831.        erences screen to view the file.
  832.  
  833.        The pdir    and pls    commands are equivalent     to  dir  and  ls
  834.        respectively,  only  they feed their output to your pager.
  835.        These commands are primarily for    line mode because  direc-
  836.        tory listings can scroll    offscreen.  If you do a    normal ls
  837.        while in    visual mode, if    it would go offscreen, the built-
  838.        in pager    kicks in automatically.     Therefore I don't recom-
  839.        mend using pdir and pls while in    visual mode.
  840.  
  841.        The redir and predir commands give you a    way to re-display
  842.        the  last directory listing.  The program saves the output
  843.        from the    last dir or ls command you did,    so if you want to
  844.        see it again you    can do this without wasting network band-
  845.        width.  The predir command is the same  as  redir,  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 put 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  put     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 get com-
  871.        mand has, except    for the    ``-z'' option.
  872.  
  873.        The pwd command prints the current remote  working  direc-
  874.        tory.  In visual    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 rename command, like:
  878.  
  879.         rename SPHYGMTR.TAR    sphygmomanometer-2.3.1.tar
  880.  
  881.        Of course, when you finish using    the program, type quit to
  882.        end the program (You could also use bye,    exit, or ^D).
  883.  
  884.        The  quote command can be used to send a    direct FTP Proto-
  885.        col command to the remote server.   Generally  this  isn't
  886.        too useful to the average user (or me either).
  887.  
  888.        The  rhelp  command  sends  a  help  request to the remote
  889.        server.    The  list  of  FTP  Protocol  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  rm
  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 UNIX.
  907.  
  908.        Similarly, the rmdir 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 set command is  provided  for  backward  compatibility
  913.        with  older  versions of    the program, and is superseded by
  914.        the prefs 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 Preferences screen.  The short names of the
  932.        preferences  fields  can     be  found   by      browsing   your
  933.        ~/.ncftp/prefs  file.  This command is mainly for use with
  934.        line mode, 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  site.
  939.        The  FTP     Protocol  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.        chmod, 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 type 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 version 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. SPECIAL    DOWNLOADING FEATURES
  971.        You probably already know that you use the get command  to
  972.        copy  files on the remote host to the local host.  But the
  973.        get command has a few other tricks  that     you  might  find
  974.        useful.    First of all, ncftp 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     mirror     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    ncftp 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.        get 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 wildcard matching    with get by using
  1035.        the ``-G'' flag.     Other FTP 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.      NcFTP     differs  in that
  1041.        respect,    and if you used    the  older  programs,  you  would
  1042.        find  that the program's    get behaves more like those other
  1043.        program's mget command.    This means that    in NcFTP,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 get 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  get
  1078.        command.      Other     FTP  programs    provided a reget 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    reget  command    to  continue  the
  1082.        transfer    where it was cut off.
  1083.  
  1084.        NcFTP  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 get 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. MACROS
  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 macros
  1114.        file in your .ncftp subdirectory    of your     home  directory.
  1115.        Your  ~/.ncftp  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  macros  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  ftp  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  ncftp  com-
  1147.        mand.
  1148.  
  1149.        Macros  can  also  have    parameters,  much  like     the Korn
  1150.        Shell's shell functions and the C-Shell'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  cd    to /pub, and then try to list its
  1165.        contents    with ls.
  1166.  
  1167.        Dollar variables    are somewhat like those    in the Bourne and
  1168.        Korn 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 event macros.
  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 .start.ncftp 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 .quit.ncftp    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    .open.typhoon and  .close.typhoon
  1209.        which would run each time I opened and closed ``typhoon.''
  1210.  
  1211.        Another,     more  generic    set  of     event    macros    are   the
  1212.        .open.any  and  .close.any 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 macdef init hack  that
  1224.        the  traditional    ftp program used in its    .netrc 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. USING COLON MODE
  1234.        The colon-mode 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 tftp to fetch a file using the Inter-
  1239.        net  standard  Trivial  File Transfer Protocol.    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-shell  to  run
  1265.        NcFTP,    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 colon-mode 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 Uniform Resource Locator 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    colon-mode file    in the current working directory,
  1282.        or perhaps you want to pipe the output of  a  remote  file
  1283.        into  something    else.  Colon-mode has options to do this.
  1284.        It was inspired by the  guy  who     wrote    the  ftpcat  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 more)    Of course this won't work
  1288.        if the thing you    give colon-mode     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. USING LINE MODE
  1309.        The only    reason I provide line mode is so that the  primi-
  1310.        tive  operating systems whose curses library is missing or
  1311.        dysfunctional won't render the program completely useless.
  1312.  
  1313.        exceptions of the functions that    require    visual mode, such
  1314.        as the Preferences screen and the  Bookmark  Editor.   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    ~/.ncftp/prefs    and
  1328.        ~/.ncftp/bookmarks file manually, with a    text editor.
  1329.  
  1330.        As a small consolation, you get to  use    the  full-powered
  1331.        line-editing  libraries,     like  GNU  Readline if    they were
  1332.        compiled    with the program.
  1333.  
  1334. SUMMARY    OF COMMAND LINE    OPTIONS
  1335.        When you    invoke the program from     your  shell,  there  are
  1336.        ``dash  flags''    you  can use like you can with most other
  1337.        UNIX 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  trace     in  your
  1350.        .ncftp  subdirectory  of    your home directory.  If you need
  1351.        to report a bug,    it would be helpful to mail me the  trace
  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    open and get commands with  a  colon  mode  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. AUTHOR
  1365.        NcFTP  was  written  by    Mike  Gleason,    NCEMRSoft (mglea-
  1366.        son@probe.net).    NcFTP 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 ftp.probe.net.
  1371.  
  1372. THANKS
  1373.        Ideas and some code contributed by my partner, Phil Dietz,
  1374.        NCEMRSoft (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 Probe Technol-
  1398.        ogy,  for  giving ncftp a home on probe.net, 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. BUGS
  1413.        Due  to    a limitation in    the curses 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 visual mode.
  1418.  
  1419.        There  are  no  such  sites named bowser.nintendo.co.jp or
  1420.        sphygmomanometer.unl.edu.
  1421.  
  1422. SEE ALSO
  1423.        ftp(1), ftpd(8),    nslookup(1), archie(1),    rcp(1),     tftp(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.