To Index

 Documented in Volume 1 of the UNIX Programmers Manual.

   Here are example ftp sessions to SIMTEL20. The purpose of the first
 session is to transfer an ASCII file to the current directory here.
 Assuming the SIMTEL20 directory is named PD: and the
 subdirectory is named VOL034 (volume 34 of the collection for IBM PC)
 and the desired file name is DBDIR.DOC.2 and it is an ASCII file:

 % ftp simtel20
        Connected to simtel20.
        220 SIMTEL20.ARPA FTP Server Process 5Z(22)-7
 Name (simtel20:): anonymous
 Password (simtel20:anonymous): 
        331 ANONYMOUS user ok, send real ident as password.
        230 User ANONYMOUS logged in at Wed 10-Apr-85 11:28-MST, job 14. 
 ftp> cd pd:
        331 Default name accepted. Send password to connect to it.
 ftp> ls db*
        200 Port 12.224 at host 128.49.0.7 accepted.
        150 List started.
 PD:DBDIR.DOC.2
 PD:DBDIR.LBR.1
        226 Transfer completed.
        70 bytes received in 0.22 seconds (0.31 Kbytes/s)
 ftp> get dbdir.doc.2
        200 Port 12.225 at host 128.49.0.7 accepted.
        150 ASCII retrieve of PD:DBDIR.DOC.2 started.
        226 Transfer completed.
        938 bytes received in 0.05 seconds (18 Kbytes/s)
 ftp> quit
        221 QUIT command received. Goodbye.
 %


 The following session shows how it looks when your login and password are
 present in your .netrc file.  Here, the intention is to transfer
 "squeezed" files (these are files with a "q" in their suffix - i.e. tqt,
 or dqc) which requires using tenex mode. The files will be sent from the
 directory named PD: to your host:

 % ftp simtel20
        Connected to simtel20.
        220 SIMTEL20.ARPA FTP Server Process 5Z(22)-7
        331 ANONYMOUS user ok, send real ident as password.
        230 User ANONYMOUS logged in at Wed 29-May-85 11:38-MDT, job 12. 
 ftp> cd pd:
        Password required for owner privileges
        331 Default name accepted. Send password to connect to it.
 ftp> ls *
        200 Port 11.182 at host 128.49.0.7 accepted.
        150 List started.
        PD:WS2ROFF.COM.1
        PD:WS30.DQC.1
        PD:WS33-PAT.DQC.1
        PD:WS33LBLS.TQT.1
        PD:WSMX80.PAT.1
 ftp> tenex
        200 Type L bytesize 8 ok.
 ftp> get ws33-pat.dqc.1
        150 Retrieve of PD:WS33-PAT.DQC.1 started.
        226 Transfer completed.
 ftp> get ws33lsbls.tqt
        150 Retrieve of PD:WS33LBLS.TQT.1 started.
        226 Transfer completed.
 ftp> quit
        221 QUIT command received. Goodbye.
 %



 % ftp -v shark
 debug
 hash
 glob
 get rgk*letter.pmss pmss.article
 quit

  will transfer the SHARK (Sperry 1100/82) file named 'RGK*LETTER.PMSS'
 into the current directory file named 'pmss.article'. 
   The -v specifies 'verbose' and causes listing (on standard output) of 
 all responses from SHARK as well as a report on data transfer statistics. 
   The debug command expands this even more. 
   The hash command causes a "#" to be printed for each 1024 byte block 
 transferred. This is helpful for monitoring the transfer from a terminal. 
   The glob command toggles globbing to 'off'; this is required
 because SHARK file names always contain an asterisk.
   The get command actually fires up the transfer.
   The quit command returns you to the shell.
 NOTE:
   This example assumes that you have a file named .netrc in your home
  directory which contains something like this:

      machine shark login last-fm password yourpasswd



  For SIMTEL20, use

       cd:.

  to get to the documentation directory,

       cd help:

  to get to the HELP files.

 From Martin Fouts  	Date-Received: 3 Feb 85
 ....there are a series of documents available online at the nic, called rfcs
 [Requests For Comment].  To get started reading rfcs [for protocols, for
 example], you should first get a copy of rfc 880 which is a list of all of
 the rfcs relevant to protocols and rfc 899 which is an index to the preceding
 100 rfcs.  A template for doing this under 4.2bsd:

 % ftp nic
 anonymous
 guest
 get rfc880.txt rfc880
 get rfc899.txt rfc899
 quit

 The text for any rfc may be obtained by typing the command

            rfc NNN

 where NNN is the rfc number.


        ****************  defaults  *****************
	MODE: stream	TYPE: ascii	FORM: non-print
	STRUCT: file	VERBOSE: on	BELL: off
	PROMPT: on	GLOB: on	HASH: off
	SENDPORT: on


  Command	Function
  -------	--------
  append	append to a file
  ascii		set ascii transfer type (opposite of 'binary')
  bell		beep when command completed
  binary	set binary transfer type (opposite of 'ascii')
  bye		terminate ftp session and exit - same as 'quit'
  cd		change remote working directory
  close		terminate ftp session
  debug		toggle/set debugging mode
  delete	delete remote file
  dir		list contents of remote directory
  form		set file transfer format
  get		receive file - same as 'recv'
  glob		toggle metacharacter expansion of local file names
  hash		toggle printing `#' for each buffer transferred
  help		print local help information - same as '?'
  lcd		change local working directory
  ls		nlist contents of remote directory
  mdelete	delete multiple files
  mdir		list contents of multiple remote directories
  mget		get multiple files
  mkdir		make directory on the remote machine
  mls		nlist contents of multiple remote directories
  mode		set file transfer mode
  mput		send multiple files
  open		connect to remote tftp
  prompt	force interactive prompting on multiple commands- default is off
  put		send one file - same as 'send'
  pwd		print working directory on remote machine
  quit		terminate ftp session and exit - same as 'bye'
  quote		send arbitrary ftp command
  recv		receive file - same as 'get'
  remotehelp	get help from remote server
  rename	rename file
  rmdir		remove directory on the remote machine
  send		send one file - same as 'put'
  sendport	toggle use of PORT cmd for each data connection
  status	show current status
  struct	set file transfer structure
  tenex		set tenex file transfer type
  trace		toggle packet tracing
  type		set file transfer type
  user		send new user information
  verbose	toggle verbose mode

To Index