home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ncftp19.zip / ncftpput.txt < prev    next >
Text File  |  1999-08-29  |  7KB  |  264 lines

  1.  
  2.  
  3.  
  4. ncftpput(1)                                           ncftpput(1)
  5.  
  6.  
  7. NAME
  8.        ncftpput - Internet file transfer program for scripts
  9.  
  10. SYNOPSIS
  11.        ncftpput  [options]  remote-host  remote-directory  local-
  12.        files...
  13.  
  14.        ncftpput -f login.cfg  [options]  remote-directory  local-
  15.        files...
  16.  
  17.        ncftpput -c remote-host remote-path-name < stdin
  18.  
  19. OPTIONS
  20.    Command line flags:
  21.        -u XX   Use username XX instead of anonymous.
  22.  
  23.        -p XX   Use password XX with the username.
  24.  
  25.        -P XX   Use port number XX instead of the default FTP ser-
  26.                vice port (21).
  27.  
  28.        -d XX   Use the file XX for debug logging.
  29.  
  30.        -a      Use ASCII transfer type instead of binary.
  31.  
  32.        -m      Attempt to make the remote  destination  directory
  33.                before copying.
  34.  
  35.        -t XX   Timeout after XX seconds.
  36.  
  37.        -U XX   Use value XX for the umask.
  38.  
  39.        -v/-V   Do  (do  not) use progress meters.  The default is
  40.                to use progress meters if the output stream  is  a
  41.                TTY.
  42.  
  43.        -f XX   Read  the  file  XX  for  host, user, and password
  44.                information.
  45.  
  46.        -A      Append to remote  files,  instead  of  overwriting
  47.                them.
  48.  
  49.        -T XX   Upload into temporary files prefixed by XX.
  50.  
  51.        -S XX   Upload into temporary files suffixed by XX.
  52.  
  53.        -R      Recursive mode; copy whole directory trees.
  54.  
  55.        -r XX   Redial  a  maximum  of XX times until connected to
  56.                the remote FTP server.
  57.  
  58.        -z/-Z   Do (do not) try to resume transfers.  The  default
  59.                is to not try to resume (-Z).
  60.  
  61.  
  62.  
  63.  
  64.                             NCEMRSoft                           1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ncftpput(1)                                           ncftpput(1)
  71.  
  72.  
  73.        -F      Use passive (PASV) data connections.
  74.  
  75.        -DD     Delete local file after successfully uploading it.
  76.  
  77.        -y      Try using "SITE UTIME" to preserve  timestamps  on
  78.                remote  host.  Not many remote FTP servers support
  79.                this, so it may not work.
  80.  
  81. DESCRIPTION
  82.        The purpose of ncftpput is to do file transfers  from  the
  83.        command-line  without entering an interactive shell.  This
  84.        lets you write shell scripts or other unattended processes
  85.        that can do FTP.  It is also useful for advanced users who
  86.        want to send files from the  shell  command  line  without
  87.        entering an interactive FTP program such as ncftp.
  88.  
  89.        By  default  the program tries to open the remote host and
  90.        login anonymously, but you  can  specify  a  username  and
  91.        password  information.   The  -u option is used to specify
  92.        the username to login as, and the -p  option  is  used  to
  93.        specify the password.  If you are running the program from
  94.        the shell, you may omit the -p option and the program will
  95.        prompt you for the password.
  96.  
  97.        Using  the  -u and -p options are not recommended, because
  98.        your account information is exposed to anyone who can  see
  99.        your  shell script or your process information.  For exam-
  100.        ple, someone using the ps program could see your  password
  101.        while the program runs.
  102.  
  103.        You  may  use the -f option instead to specify a file with
  104.        the account  information.   However,  this  is  still  not
  105.        secure  because anyone who has read access to the informa-
  106.        tion file can see the account information.   Nevertheless,
  107.        if  you  choose  to use the -f option the file should look
  108.        something like this:
  109.  
  110.               host Bozo.probe.net
  111.               user gleason
  112.               pass mypasswd
  113.  
  114.        Don't forget to change the permissions on this file so  no
  115.        one else can read them.
  116.  
  117.        The  -d option is very useful when you are trying to diag-
  118.        nose why a file transfer is failing.  It  prints  out  the
  119.        entire  FTP  conversation  to the file you specify, so you
  120.        can get an idea of what went wrong.  If  you  specify  the
  121.        special  name  stdout  as the name of the debugging output
  122.        file, the output will instead print to the screen.
  123.  
  124.        Using ASCII mode is helpful when the text format  of  your
  125.        host  differs  from that of the remote host.  For example,
  126.        if you are sending a text file from a  UNIX  system  to  a
  127.  
  128.  
  129.  
  130.                             NCEMRSoft                           2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ncftpput(1)                                           ncftpput(1)
  137.  
  138.  
  139.        Windows-based  host, you could use the -a flag which would
  140.        use ASCII transfer mode so that the file  created  on  the
  141.        Windows machine would be in its native text format instead
  142.        of the UNIX text format.
  143.  
  144.        You can upload an entire directory tree of files by  using
  145.        the -R flag.  Example:
  146.  
  147.            $ ncftpput -R ftp.probe.net /incoming /tmp/stuff
  148.  
  149.        This  would  create  a  /incoming/stuff  hierarchy  on the
  150.        remote host.
  151.  
  152.        The -T and -S options are useful when you want  to  upload
  153.        file  to  the  remote  host, but you don't want to use the
  154.        destination pathname until the file  is  complete.   Using
  155.        these  options,  you will not destroy a remote file by the
  156.        same name until your file is finished.  These options  are
  157.        also useful when a remote process on the remote host polls
  158.        a specific filename, and you don't want  that  process  to
  159.        see that file until you know the file is finished sending.
  160.        Here is an example that uploads to  the  file  /pub/incom-
  161.        ing/README, using the filename /pub/incoming/README.tmp as
  162.        a temporary filename:
  163.  
  164.            $  ncftpput  -S  .tmp   Bozo.probe.net   /pub/incoming
  165.            /a/README
  166.  
  167.        A  neat way to pipe the output from any local command into
  168.        a remote file is to use the -c option, which denotes  that
  169.        you're  using stdin as input.  The following example shows
  170.        how to make a backup and store it on a remote machine:
  171.  
  172.            $   tar   cf   /   |   ncftpput   -c    Bozo.probe.net
  173.            /usr/local/backup.tar
  174.  
  175. DIAGNOSTICS
  176.        ncftpput returns the following exit values:
  177.  
  178.        0       Success.
  179.  
  180.        1       Could not connect to remote host.
  181.  
  182.        2       Could not connect to remote host - timed out.
  183.  
  184.        3       Transfer failed.
  185.  
  186.        4       Transfer failed - timed out.
  187.  
  188.        5       Directory change failed.
  189.  
  190.        6       Directory change failed - timed out.
  191.  
  192.        7       Malformed URL.
  193.  
  194.  
  195.  
  196.                             NCEMRSoft                           3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ncftpput(1)                                           ncftpput(1)
  203.  
  204.  
  205.        8       Usage error.
  206.  
  207.        9       Error in login configuration file.
  208.  
  209.        10      Library initialization failed.
  210.  
  211.        11      Session initialization failed.
  212.  
  213. AUTHOR
  214.        Mike Gleason, NCEMRSoft (mgleason@probe.net).
  215.  
  216. SEE ALSO
  217.        ncftpget(1), ncftp(1), ftp(1), rcp(1), tftp(1).
  218.  
  219.        LibNcFTP (http://www.probe.net/~mgleason/libncftp).
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                             NCEMRSoft                           4
  263.  
  264.