Retrieving a File from an InterNet Host

The next piece of dialogue illustrates how to transfer a file from an InterNet host into your directory on uk.ac.nsf.sun. This uses the ftp command get.

   ftp> get mailbox
   200 PORT command okay.
   150 Opening data connection for profile (128.41.9.3,1551) (118 bytes).
   226 Transfer complete.
   126 bytes received in 0.34 seconds (0.36 Kbytes/s)
   ftp>

This will retrieve the remote file mailbox into a local file also called mailbox. It is also possible to transfer the remote file into a local file with a different name :

   ftp> get
   (remote-file) aliases
   (local-file) alias
   200 PORT command okay.
   150 Opening data connection for aliases (128.41.9.3,1553) (118 bytes).
   226 Transfer complete.
   126 bytes received in 11.66 seconds (0.011 Kbytes/s)
   ftp>

This will transfer the file aliases on the remote machine to the file alias in your directory on uk.ac.nsf.sun.

Once you have finished transferring files, you should close the connection and quit ftp:

   ftp> close
   221 Goodbye
   ftp> quit
   guest_ftp>

[Home] [Search] [Index] This site maintained by webmaster@cs.auckland.ac.nz