home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d927 / ftp.lha / Ftp / ftp.man < prev    next >
Text File  |  1993-10-07  |  21KB  |  476 lines

  1.  
  2.  
  3.  
  4. FTP(1C)                   USER COMMANDS                   FTP(1C)
  5.  
  6.  
  7.  
  8. NAME
  9.      ftp - file transfer program
  10.  
  11. DESCRIPTION
  12.      ftp is the user  interface  to  the  ARPANET  standard  File
  13.      Transfer  Protocol (FTP).  ftp transfers files to and from a
  14.      remote network site.
  15.  
  16.      The client host with which ftp  is  to  communicate  may  be
  17.      specified on the command line.  If this is done, ftp immedi-
  18.      ately attempts to establish a connection to an FTP server on
  19.      that host; otherwise, ftp enters its command interpreter and
  20.      awaits instructions from the user.   When  ftp  is  awaiting
  21.      commands from the user, it displays the prompt `ftp>'.
  22.  
  23. COMMANDS
  24.  
  25.      ! 
  26.           Redisplays the previous console output file (i.e. file
  27.           with a local name of `-' [or directory display])
  28.  
  29.      $ macro-name [ args ]
  30.           Execute the macro macro-name that was defined with  the
  31.           macdef  command.   Arguments  are  passed  to the macro
  32.           unglobbed.
  33.  
  34.      account [ passwd ]
  35.           Supply a supplemental password  required  by  a  remote
  36.           system  for  access  to resources once a login has been
  37.           successfully completed.  If no  argument  is  included,
  38.           the  user will be prompted for an account password in a
  39.           non-echoing input mode.
  40.  
  41.      append local-file [ remote-file ]
  42.           Append a local file to a file on  the  remote  machine.
  43.           If remote-file is left unspecified, the local file name
  44.           is used in naming the remote file after  being  altered
  45.           by  any ntrans or nmap setting.  File transfer uses the
  46.           current  settings  for  "representation  type",   "file
  47.           structure", and "transfer mode".
  48.  
  49.      ascii
  50.           Set the "representation type"  to  "network  "  ASCII".
  51.           This is the default type.
  52.  
  53.      bell Sound a bell after each file transfer command  is  com-
  54.           pleted.
  55.  
  56.      binary
  57.           Set the "representation type" to "image".
  58.  
  59.      bye  Terminate the FTP session with the  remote  server  and
  60.           exit  ftp.   An EOF will also terminate the session and
  61.           exit.
  62.  
  63.      case Toggle remote computer file name  case  mapping  during
  64.           mget  commands.   When  case  is  on  (default is off),
  65.           remote computer file names with all  letters  in  upper
  66.           case  are  written  in  the  local  directory  with the
  67.           letters mapped to lower case.
  68.  
  69.      cd remote-directory
  70.           Change the working directory on the remote  machine  to
  71.           remote-directory.
  72.  
  73.      cdup Change the remote  machine  working  directory  to  the
  74.           parent of the current remote machine working directory.
  75.  
  76.      close
  77.           Terminate the FTP session with the remote  server,  and
  78.           return  to the command interpreter.  Any defined macros
  79.           are erased.
  80.  
  81.      cr   Toggle RETURN stripping during "network "  ASCII"  type
  82.           file    retrieval.     Records   are   denoted   by   a
  83.           RETURN/LINEFEED sequence during "network " ASCII"  type
  84.           file  transfer.   When  cr  is on (the default), RETURN
  85.           characters are stripped from this sequence  to  conform
  86.           with  the UNIX system single LINEFEED record delimiter.
  87.           Records on non-UNIX-system  remote  hosts  may  contain
  88.           single  LINEFEED  characters; when an "network " ASCII"
  89.           type transfer is made, these LINEFEED characters may be
  90.           distinguished  from  a record delimiter only when cr is
  91.           off.
  92.  
  93.      delete remote-file
  94.           Delete the file remote-file on the remote machine.
  95.  
  96.      debug [ debug-value ]
  97.           Toggle debugging mode. If an  optional  debug-value  is
  98.           specified  it is used to set the debugging level.  When
  99.           debugging is on, ftp prints each command  sent  to  the
  100.           remote machine, preceded by the string `-->'.
  101.  
  102.      dir [ remote-directory ] [ local-file ]
  103.           Print a listing of the directory contents in the direc-
  104.           tory,  remote-directory,  and,  optionally, placing the
  105.           output in local-file.  If no  directory  is  specified,
  106.           the  current working directory on the remote machine is
  107.           used.  If no local file is specified, or local-file  is
  108.           `-', output is sent to the terminal.
  109.  
  110.      disconnect
  111.           A synonym for close.
  112.  
  113.      form [ format-name ]
  114.           Set  the  carriage  control  format  subtype   of   the
  115.           "representation  type"  to format-name.  The only valid
  116.           format-name is  non-print,  which  corresponds  to  the
  117.           default "non-print" subtype.
  118.  
  119.      get remote-file [ local-file ]
  120.           Retrieve the remote-file and  store  it  on  the  local
  121.           machine.   If  the local file name is not specified, it
  122.           is given the same name it has on  the  remote  machine,
  123.           subject  to alteration by the current case, ntrans, and
  124.           nmap settings.  The current settings  for  "representa-
  125.           tion  type",  "file structure", and "transfer mode" are
  126.           used while transferring the file.
  127.  
  128.      glob Toggle filename expansion, or "globbing", for  mdelete,
  129.           mget  and  mput.   If globbing is turned off, filenames
  130.           are taken literally.
  131.  
  132.           Globbing for mput is done as in  csh(1).   For  mdelete
  133.           and  mget, each remote file name is expanded separately
  134.           on the remote machine, and the lists are not merged.
  135.  
  136.           Expansion of a directory name is likely to be radically
  137.           different  from  expansion  of  the name of an ordinary
  138.           file: the exact result depends on the remote  operating
  139.           system  and  FTP  server, and can be previewed by doing
  140.           `mls remote-files -'.
  141.  
  142.           mget and mput are not meant to transfer  entire  direc-
  143.           tory  subtrees  of files.  You can do this by transfer-
  144.           ring  a  tar(1)  archive  of  the  subtree   (using   a
  145.           "representation  type"  of "image" as set by the binary
  146.           command).
  147.  
  148.      hash Toggle hash-sign  (#)  printing  for  each  data  block
  149.           transferred.
  150.  
  151.      help [ command ]
  152.           Print an informative message about the meaning of  com-
  153.           mand.   If  no  argument is given, ftp prints a list of
  154.           the known commands.
  155.  
  156.      ls [ remote-directory ] [ local-file ]
  157.           Print an abbreviated  listing  of  the  contents  of  a
  158.           directory  on  the remote machine.  If remote-directory
  159.           is left unspecified, the current working  directory  is
  160.           used.   If no local file is specified, or if local-file
  161.           is `-', the output is sent to the terminal.
  162.  
  163.      macdef macro-name
  164.           Define a macro.  Subsequent lines  are  stored  as  the
  165.           macro  macro-name;  a  null  line  (consecutive NEWLINE
  166.           characters in a file or RETURN characters from the ter-
  167.           minal)  terminates  macro input mode.  There is a limit
  168.           of 16 macros and 4096 total characters in  all  defined
  169.           macros.  Macros remain defined until a close command is
  170.           executed.
  171.  
  172.           The macro processor interprets `$' and `\'  as  special
  173.           characters.  A `$' followed by a number (or numbers) is
  174.           replaced by the corresponding  argument  on  the  macro
  175.           invocation  command  line.   A  `$'  followed by an `i'
  176.           signals that macro processor that the  executing  macro
  177.           is  to be looped. On the first pass `$i' is replaced by
  178.           the first argument  on  the  macro  invocation  command
  179.           line,  on  the second pass it is replaced by the second
  180.           argument, and so on.  A `\' followed by  any  character
  181.           is  replaced by that character.  Use the `\' to prevent
  182.           special treatment of the `$'.
  183.  
  184.      mdelete [ remote-files ]
  185.           Delete the remote-files on the remote machine.
  186.  
  187.      mdir remote-files local-file
  188.           Like dir, except multiple remote files  may  be  speci-
  189.           fied.   If interactive prompting is on, ftp will prompt
  190.           the user to verify that the last argument is indeed the
  191.           target local file for receiving mdir output.
  192.  
  193.      mkdir directory-name
  194.           Make a directory on the remote machine.
  195.  
  196.      mls remote-files local-file
  197.           Like ls(1V), except multiple remote files may be speci-
  198.           fied.   If interactive prompting is on, ftp will prompt
  199.           the user to verify that the last argument is indeed the
  200.           target local file for receiving mls output.
  201.  
  202.      mode [ mode-name ]
  203.           Set the "transfer mode" to mode-name.  The  only  valid
  204.           mode-name  is  stream, which corresponds to the default
  205.           "stream" mode.
  206.  
  207.  
  208.      nmap [ inpattern outpattern ]
  209.           Set or unset the filename  mapping  mechanism.   If  no
  210.           arguments are specified, the filename mapping mechanism
  211.           is unset.  If arguments are specified, remote filenames
  212.           are mapped during mput commands and put commands issued
  213.           without a specified remote target filename.   If  argu-
  214.           ments  are specified, local filenames are mapped during
  215.           mget commands and get commands issued without a  speci-
  216.           fied local target filename.
  217.  
  218.           This command is useful when connecting to  a  non-UNIX-
  219.           system  remote  host with different file naming conven-
  220.           tions or practices.  The mapping  follows  the  pattern
  221.           set  by  inpattern and outpattern.  inpattern is a tem-
  222.           plate for incoming filenames (which  may  have  already
  223.           been  processed  according  to the ntrans and case set-
  224.           tings).  Variable templating is accomplished by includ-
  225.           ing  the sequences $1, $2, ..., $9 in inpattern.  Use \
  226.           to prevent this special treatment of the  $  character.
  227.           All  other  characters  are  treated literally, and are
  228.           used to determine the nmap inpattern variable values.
  229.  
  230.           For example, given inpattern $1.$2 and the remote  file
  231.           name mydata.data, $1 would have the value "mydata", and
  232.           $2 would have the value "data".
  233.  
  234.           The  outpattern   determines   the   resulting   mapped
  235.           filename.   The  sequences $1, $2, ..., $9 are replaced
  236.           by any value resulting  from  the  inpattern  template.
  237.           The  sequence  $0 is replaced by the original filename.
  238.           Additionally, the sequence `[seq1,seq2]' is replaced by
  239.           seq1  if  seq1  is  not  a null string; otherwise it is
  240.           replaced by seq2.
  241.  
  242.           For    example,    the    command    `nmap     $1.$2.$3
  243.           [$1,$2].[$2,file]'  would  yield  the  output  filename
  244.           myfile.data  for  input   filenames   myfile.data   and
  245.           myfile.data.old,  myfile.file  for  the  input filename
  246.           myfile,  and  myfile.myfile  for  the  input   filename
  247.           .myfile.   SPACE  characters may be included in outpat-
  248.           tern, as in the example `nmap $1 |  sed  "s/   *$//"  >
  249.           $1'.   Use the \ character to prevent special treatment
  250.           of the `$', `[', `]' and `,' characters.
  251.  
  252.      ntrans [ inchars [ outchars ] ]
  253.           Set or unset the filename character translation mechan-
  254.           ism.  If no arguments are specified, the filename char-
  255.           acter translation mechanism is unset.  If arguments are
  256.           specified,   characters   in   remote   filenames   are
  257.           translated during mput commands and put commands issued
  258.           without a specified remote target filename, and charac-
  259.           ters in local  filenames  are  translated  during  mget
  260.           commands  and  get  commands issued without a specified
  261.           local target filename.
  262.  
  263.           This command is useful when connecting to  a  non-UNIX-
  264.           system  remote  host with different file naming conven-
  265.           tions or practices.  Characters in a filename  matching
  266.           a   character   in   inchars   are  replaced  with  the
  267.           corresponding   character   in   outchars.    If    the
  268.           character's  position  in  inchars  is  longer than the
  269.           length of outchars, the character is deleted  from  the
  270.           file name.
  271.  
  272.      open host [ port ]
  273.           Establish  a  connection  to  the  specified  host  FTP
  274.           server.   An  optional  port number may be supplied, in
  275.           which case, ftp will attempt to contact an  FTP  server
  276.           at   that   port.   If  the  auto-login  option  is  on
  277.           (default), ftp will also attempt to  automatically  log
  278.           the user in to the FTP server (see below).
  279.  
  280.      put local-file [ remote-file]
  281.           Store a local file on the remote machine.   If  remote-
  282.           file  is  left unspecified, the local file name is used
  283.           after processing according to any ntrans or  nmap  set-
  284.           tings  in  naming  the remote file.  File transfer uses
  285.           the current settings for "representation  type",  "file
  286.           structure", and "transfer mode".
  287.  
  288.      pwd  Print the name of the current working directory on  the
  289.           remote machine.
  290.  
  291.      quit A synonym for bye.
  292.  
  293.      quote arg1 arg2 ...
  294.           Send the arguments specified, verbatim, to  the  remote
  295.           FTP  server.   A  single  FTP reply code is expected in
  296.           return.
  297.  
  298.      recv remote-file [ local-file]
  299.           A synonym for get.
  300.  
  301.      remotehelp [ command-name ]
  302.           Request  help  from  the  remote  FTP  server.   If   a
  303.           command-name  is specified it is supplied to the server
  304.           as well.
  305.  
  306.      rename from to
  307.           Rename the file from on the remote machine to have  the
  308.           name to.
  309.  
  310.      reset
  311.           Clear  reply  queue.   This   command   re-synchronizes
  312.           command/reply  sequencing  with  the remote FTP server.
  313.           Resynchronization may be necessary following  a  viola-
  314.           tion of the FTP protocol by the remote server.
  315.  
  316.      rmdir directory-name
  317.           Delete a directory on the remote machine.
  318.  
  319.      runique
  320.           Toggle storing of files on the local system with unique
  321.           filenames.   If a file already exists with a name equal
  322.           to the target local filename for a get or mget command,
  323.           a  `.1' is appended to the name.  If the resulting name
  324.           matches another existing file, a `.2'  is  appended  to
  325.           the  original  name.   If  this process continues up to
  326.           `.99', an error message is printed,  and  the  transfer
  327.           does  not  take  place.   The generated unique filename
  328.           will be reported.  Note: runique will not affect  local
  329.           files  generated from a shell command (see below).  The
  330.           default value is off.
  331.  
  332.      send local-file [ remote-file ]
  333.           A synonym for put.
  334.  
  335.      sendport
  336.           Toggle the use of PORT commands.  By default, ftp  will
  337.           attempt  to use a PORT command when establishing a con-
  338.           nection for each data transfer.  The use of  PORT  com-
  339.           mands  can prevent delays when performing multiple file
  340.           transfers. If the PORT command fails, ftp will use  the
  341.           default  data  port.  When  the use of PORT commands is
  342.           disabled, no attempt will be made to use PORT  commands
  343.           for  each data transfer.  This is useful when connected
  344.           to certain FTP implementations that  ignore  PORT  com-
  345.           mands but incorrectly indicate they have been accepted.
  346.  
  347.      status
  348.           Show the current status of ftp.
  349.  
  350.      struct [ struct-name ]
  351.           Set the "file  structure"  to  struct-name.   The  only
  352.           valid  struct-name  is  file,  which corresponds to the
  353.           default "file" structure.
  354.  
  355.      sunique
  356.           Toggle storing of files on remote machine under  unique
  357.           file  names.   The  remote  FTP server must support the
  358.           STOU command for  successful  completion.   The  remote
  359.           server  will  report the unique name.  Default value is
  360.           off.
  361.  
  362.      trace
  363.           Toggle packet tracing (unimplemented).
  364.  
  365.      type [ type-name ]
  366.           Set the "representation type" to type-name.  The  valid
  367.           type-names  are  ascii for "network " ASCII", binary or
  368.           image for "image", and tenex for "local byte size" with
  369.           a  byte size of 8 (used to talk to TENEX machines).  If
  370.           no type is specified, the current type is printed.  The
  371.           default type is "network " ASCII".
  372.  
  373.      user user-name [ password ] [ account ]
  374.           Identify yourself to the  remote  FTP  server.  If  the
  375.           password  is  not specified and the server requires it,
  376.           ftp will prompt the user for it (after disabling  local
  377.           echo).   If  an account field is not specified, and the
  378.           FTP server requires it, the user will be  prompted  for
  379.           it.   If  an  account  field  is  specified, an account
  380.           command will be relayed to the remote server after  the
  381.           login  sequence  is  completed if the remote server did
  382.           not require it for logging in.  Unless ftp  is  invoked
  383.           with   "auto-login"  disabled,  this  process  is  done
  384.           automatically on initial connection to the FTP server.
  385.  
  386.      verbose
  387.           Toggle verbose mode.  In verbose  mode,  all  responses
  388.           from  the  FTP  server  are  displayed to the user.  In
  389.           addition, if verbose mode is on, when a  file  transfer
  390.           completes,  statistics  regarding the efficiency of the
  391.           transfer are reported. By default, verbose mode  is  on
  392.           if  ftp's  commands are coming from a terminal, and off
  393.           otherwise.
  394.  
  395.      ? [ command ]
  396.           A synonym for help.
  397.  
  398.      Command arguments which have embedded spaces may  be  quoted
  399.      with quote (") marks.
  400.  
  401.      If any command argument which  is  not  indicated  as  being
  402.      optional  is  not  specified, ftp will prompt for that argu-
  403.      ment.
  404.  
  405. ABORTING A FILE TRANSFER
  406.      To abort a file transfer, press any  key. Sending  transfers
  407.      will  be immediately halted.  
  408.  
  409.      Receiving transfers will be halted by sending a ftp protocol
  410.      ABOR  command  to  the  remote  server, and  discarding  any 
  411.      further  data   received.   The  speed  at   which  this  is
  412.      accomplished  depends  upon  the remote server's support for
  413.      ABOR processing.  If the remote server does not support  the
  414.      ABOR  command,  an  "ftp>"  prompt will not appear until the
  415.      remote server has completed sending the requested file.
  416.  
  417.      The terminal interrupt key sequence will be ignored when ftp
  418.      has  completed  any local processing and is awaiting a reply
  419.      from the remote server.  A  long  delay  in  this  mode  may
  420.      result  from  the  ABOR  processing described above, or from
  421.      unexpected behavior by the remote server,  including  viola-
  422.      tions  of the ftp protocol.  If the delay results from unex-
  423.      pected remote server behavior, the local ftp program must be
  424.      killed by hand.
  425.  
  426. FILE NAMING CONVENTIONS
  427.      Local files specified as arguments to ftp commands are  pro-
  428.      cessed according to the following rules.
  429.  
  430.      1)   If the file name `-' is specified, the  standard  input
  431.           (for reading) or standard output (for writing) is used.
  432.       When `-' is specified for the output in the Amiga
  433.           version, the data is written to a file called '.temp',
  434.           This is done so that the '!' [redisplay] command can be
  435.           used. FTP does not delete this file.
  436.  
  437.      2)   For get commands with unspecified local file names, the
  438.       local  filename is the remote  filename, which  may  be 
  439.       altered  by  a  case,  ntrans,  or  nmap  setting.  The 
  440.       resulting filename may then be altered if runique is on.
  441.  
  442.      3)   For put commands with unspecified  remote  file  names, 
  443.       the remote filename is the local filename, which may be
  444.       altered by a ntrans  or  nmap  setting.  The  resulting
  445.       filename may then be altered by the  remote  server  if
  446.       sunique is on.
  447.  
  448. FILE TRANSFER PARAMETERS
  449.      The FTP specification specifies many  parameters  which  may
  450.      affect a file transfer.
  451.  
  452.      The "representation type" may be one of "network  "  ASCII",
  453.      "EBCDIC",  "image",  or  "local  byte size" with a specified
  454.      byte size (for PDP-10's and PDP-20's mostly).  The  "network
  455.      "  ASCII"  and  "EBCDIC"  types have a further subtype which
  456.      specifies whether vertical format control  (NEWLINE  charac-
  457.      ters,  form  feeds,  etc.)  are  to be passed through ("non-
  458.      print"), provided in  TELNET  format  ("TELNET  format  con-
  459.      trols"),  or  provided  in  ASA (FORTRAN) ("carriage control
  460.      (ASA)") format.  ftp supports the "network " ASCII" (subtype
  461.      "non-print"  only) and "image" types, plus "local byte size"
  462.      with a byte size of 8 for communicating with TENEX machines.
  463.  
  464.      The "file structure" may be one of "file" (no record  struc-
  465.      ture),  "record",  or "page".  ftp supports only the default
  466.      value, which is "file".
  467.  
  468.      The "transfer mode" may be  one  of  "stream",  "block",  or
  469.      "compressed".  ftp supports only the default value, which is
  470.      "stream".
  471.  
  472. BUGS
  473.      Correct execution  of  many  commands  depends  upon  proper
  474.      behavior by the remote server.
  475.  
  476.