Provided by: manpages-zh_1.5.2-1_all bug

NAME

     ftp -- Internet  (file transfer program)

 (SYNOPSIS)
     ftp [-pinegvd] [host] pftp [-inegvd] [host]

 (DESCRIPTION)
      Ftp Internet  (File Transfer  Protocol).  , .

     ftp, ftp.

     -p    . , , .   ftp  PASV .   pftp  ftp, .

     -i    .

     -n     ftp , ftp . .   auto-login ,  ftp  home  .netrc ( netrc(5)) .
           .netrc , ftp  (), , . ??

           (: ,  "".  :

           echo open ftp_server "\n" user my_name my_password "\n" dir "\n"
           bye | ftp -n  rcp ,  ftp .)

     -e     ftp , ; . ??

     -g    .

     -v    .  ftp , .

     -d     debug .

      ftp , . , ftp FTP ; , ftp , .  ftp , 'ftp>'

     ftp :

     ! [command [args]]
                 shell. ,  shell ,  shell .

     $ macro-name [args]
                  macro-name .  macdef . , .

     account [passwd]
                 , , .  , ; , .

     append local-file [remote-file]
                 .  remote-file, ntrans nmap , .  type, forma, mode structure
                 .

     ascii        ASCII , .  .

     bell        .

     binary       binary image, .

     bye          FTP , ftp.  (: ctrl-D) .

     case         case , .  mget .  case  on, , .  case  off.  (: toggle . ,
                 case  on,  case , case  off;  off,  on. .)

     cd remote-directory
                  remote-directory.

     cdup        , .

     chmod mode file-name
                  file-name mode.

     close        FTP , . .

     cr           cr ,  ascii .   ascii , , ; cr  on, UNIX .  UNIX ;  ascii ,
                 cr  off, .  cr  on.  (:  ASCII  0D,  C  \r;  ASCII  0A ,  C
                 \n; UNIX , ; DOS  , :  + .   ftpd  ascii ,  + , ;  ftp  ascii
                 ,  cr  on, ftp  + ;  off, .  + ,  cr  off, ; ,  + , .  binary
                 .)

     delete remote-file
                  remote-file.

     debug [debug-value]
                  debugging , .  debug-value , .   debigging  on , ftp , '-->'

     dir [remote-directory] [local-file]
                  remote-director .  local-file .  , local-file .   prompt
                 on, ftp dir .  remote-director, .  local-file, local-file -,
                 .

     disconnect   close.

     form format
                  format.  ``file''. ??

     get remote-file [local-file]
                  remote-file .  , case, ntrans nmap , .  type, form, mode,
                 structure .

     glob         glob , mdelete, mget mput , .  glob  off, .  mput , csh(1) .
                 mdelete mget , , .  ,  ftp .  'mls remote-files -' .  : mget
                 mput . ,  binary tar(1) .  (: 1 , *n  n .  ,  linux  Xie Wen
                 Min ,  shell  echo *n ,  Wen Min ,  *n  shell  Wen Min.   ftp
                 ,  glob  on , mput *n  mput Wen Min ,  Wen Min .   glob  off
                 , mput *n ,  mput  "*n" ,  "*n" , ftp .  2 mput ,  shell.
                 mget, mdelete , .  3 :  Xie, Wen, Min  mget X* W* *n, ,  Xie
                 Wen Min Wen.   Wen ,  ftp ,  Wen  mget , .   mdel X* W* *n,
                 Wen , .)

     hash         hash , .  hash  on,  1024  # .

     help [command]
                  command . , ftp .

     idle [seconds]
                  seconds .  seconds, .   ftp , .

     lcd [directory]
                 .  directory,  home .

     ls [remote-directory] [local-file]
                 . ; , UNIX  shell  ls -l  ( nlist ).  remote-directory .
                 prompt  on , ftp ls .  local-file , local-file '-', . .  ,
                 UNIX,  ls "-rt /usr"  /usr , .

     macdef macro-name
                 . , macro-name .  (, ) .   16 ,  4096 .  close .  , $  \ .  $
                 , .  $  i , .  , $i ; , , .  \ , .  , \  $ ,  $ .

     mdelete [remote-files]
                  remote-files.

     mdir remote-files local-file
                  dir , .  prompt  on, ftp .

     mget remote-files
                  remote-files , get . , glob .  case, ntrans, nmap , , .  .
                 'lcd directory' , '! mkdir directory' .

     mkdir directory-name
                 .

     mls remote-files local-file
                  nlist , , local-file .  prompt  on, ftp .

     mode [mode-name]
                  mode-name .  ``stream'' . ??

     modtime file-name
                 .

     mput local-files
                 , put . , glob .  ntrans nmap , , .

     newer file-name [local-file]
                 , , , .

     nlist [remote-directory] [local-file]
                 .  remote-directory, .   prompt  on, ftp .  local-file,
                 local-file 'Fl,' .

     nmap [inpattern outpattern]
                 . , .  , mput put , , ; mget get , , .   unix  unix ,  ftp ,
                 .  inpattern outpattern .  ntrans case , inpattern nmap .
                 inpattern .  outpattern .  inpattern outpattern ,  $1, $2,
                 ..., $9 ;  \$  $ ; . , inpattern  $1.$2,  mydata.data, $1
                 mydata, $2 data.  outpattern .  outpattern , $1, $2, ..., $9
                 , .  $0 .  [$x,$y] ,  $x ,  $x;  $y ( x,y ).  :  nmap
                 $1.$2.$3 [$1,$2].[$2,file],  myfile.data  myfile.data,
                 myfile.data.old  myfile.data,  myfile  myfile.file,  .myfile
                 myfile.myfile, Spaces may be included in outpattern, as in
                 the example: `nmap $1 sed "s/  *$//" > $1' . ??  (: , .)
                 `$', '[', ']', `,' , ,  \ .

     ntrans [inchars [outchars]]
                 . , . , mput put , , ; mget get , , .   unix  unix ,  ftp , .
                 inchars outchars.  inchar  outchar , .

     open host [port]
                  host FTP .  ftp ; , ftp FTP .  auto-login  (), ftp .  ()

     prompt       prompt , .  prompt  on , , ftp ;  prompt  off ( on), mget
                 mput , mdelete .

     proxy ftp-command
                  ftp .  ftp , .  (:  ftp  primary control connection, ;
                 proxy open  secondary control connection, .   ftp ,  ftp
                 proxy , proxy open, proxy put .  ``proxy ftp command''  "".)
                 open , .   "proxy ?" ,  ftp .   ftp , : , open ; close ; get
                 mget ; put, mput, append .   ftp PASV .

     put local-file [remote-file]
                 .  remote-file, ntrans nmap , , .  type, format, mode
                 structure .

     pwd         .

     quit         bye .

     quote arg1 arg2 ...
                  FTP .  (:  ftp ,  ftp ,  ftp ,  ftp .   ftp ,  raw ftp
                 command, . ,  remotehelp .   raw ftp command.)

     recv remote-file [local-file]
                  get .

     reget remote-file [local-file]
                  get , : local-file remote-file , ftp , ,  reget .  , .

     remotehelp [command-name]
                  FTP .  command-name, .

     remotestatus [file-name]
                 , .  file-name, file-name .

     rename [from] [to]
                  from to.

     reset       .  ftp  ftp /.  ftp ,  ftp , .

     restart marker
                 , get put ;  get  put marker UNIX  () .

     rmdir directory-name
                 .

     runique      runique , .   runique  off, get mget , ;  runique  on, ,
                 .1;  .1 ,  .2; ,  .3; ,  .99 , .  .  runique  shell .
                 runique  off.

     send local-file [remote-file]
                  put .

     sendport     sendport , PORT . , ftp , PORT .  PORT .  PORT , ftp .  PORT
                 , PORT .  FTP PORT , PORT , .

     site arg1 arg2 ...
                  SITE FTP .

     size file-name
                  file-name .

     status       ftp .

     struct [struct-name]
                  structure struct-name.  stream. ??

     sunique      sunique , .  ,  ftp  ftp STOU . .   sunique  off, .

     system      .

     tenex        TENEX . ??

     trace        trace , .

     type [type-name]
                  type type-name. , .  ASCII .

     umask [newmask]
                  newmask. newmask, .

     user user-name [password] [account]
                  [user-name] FTP .  password, , ftp  (); account, FTP , ftp .
                 account,  FTP ,  account .  , ftp , FTP .  ftp  -n .

     verbose      verbose , .   verbose  on , FTP , .   verbose  on .

     ? [command]
                  help .

     ,  "" .

 (ABORTING A FILE TRANSFER)
      ( Ctrl-C ) .  , ; ,  ftp ABOR , .  , ABOR .  ABOR , , , 'ftp>.'

     , ftp , .  ftp ,  ABOR , .  ftp , ftp .

 (FILE NAMING CONVENTIONS)
     ftp , , :

     1.    '-', stdin, stdout.

     2.    '|,'  shell .  Ftp popen(3)  shell ,  stdin ( stdout)  () .   shell
          , ; : "ls -lt". : "dir | more".

     3.   ,  globbing  on , , csh(1) ( glob ).  ftp  ( put), .

     4.    mget get , , case, ntrans, nmap , .  runique  on, .

     5.    mput put , , ntrans nmap , .  sunique  on, .

 (FILE TRANSFER PARAMETERS)
     FTP .  type  ascii, image (binary), ebcdic,  local byte size ( PDP-10's
     PDP-20's ).  Ftp  ascii  image , tenex ,  local byte size 8 .

      mode, form, struct. Ftp .

 (ENVIRONMENT)
     Ftp :

     HOME         .netrc , .

     SHELL        shell.

 (SEE ALSO)
     ftpd(8,) RFC 959

 (HISTORY)
     ftp 4.2.BSD

 (BUGS)
      ftp , , .

      4.2BSD  ascii , .  , :  ascii , 4.2BSD .  ,  binary image .