Introduction to the Unix Cluster. Node: FTP

PREV FileOps UP FileOps NEXT RCP

FTP and Anonymous FTP

Ftp is the user interface to the ARPANET standard File Transfer Protocol (FTP). For convenience, from here on after `FTP' will be referred to as the main file transfer program used in Theory and PPPL. It allows two-way transfer of binary and text files between the Suns, the VAXes, and the Crays. FTP also works on the Macs under NCSA Telnet (you must run it on the remote machine), but other methods prove more convenient (see Mac). If the remote machine with which FTP is to communicate is specified, FTP immediately attempts to connect to the server on that host; otherwise it directly enters its command interpreter mode and displays the prompt ftp>.

The best way to learn FTP is through example, so here's what it would look like to run FTP on Lyman to copy the file `intro.texi' from Cray A:

   [lyman|12] ftp a.nersc.gov
   Connected to a.nersc.gov.
   220 a FTP server (Version 5.2 Fri Sep 7 14:09:58 CDT 1990) ready.
   Name (a.nersc.gov:karney): u6225
   331 Password required for u6225.
   Password:
   230 User u6225 logged in.
   ftp> get intro.texi
   200 PORT command successful.
   150 Opening ASCII mode data connection for intro.texi (3697 bytes).
   226 Transfer complete.
   local: intro.texi remote: intro.texi
   3697 bytes received in 0.042 seconds (86 Kbytes/s)
   ftp> bye 
   221 Goodbye.
   [lyman|13]

The most useful commands while in the ftp> command interpreter are:

The file `.netrc' is very useful for transferring files because it allows the user to save time from the tedious task of having to log in and enter a password every time to run FTP. In the above example, when FTP looked in your `.netrc' file and found `a.nersc.gov', your username, and your password, you would bypass the login procedure and save time. However, since this also forces the user to store passwords in unencrypted form in the file, using the `.netrc' method is strongly discouraged. If you will be using FTP very often, look into getting an NFS mount (see NFS/Emacs).

Many hosts also offer a service known as `anonymous FTP,' which allows users without accounts on the remote machine to have limited access in retrieving (and sometimes storing) files. The convention is to type anonymous as the username and give your real username as the password. Anonymous accounts are usually restricted to FTP only---free software such as Emacs, X-Windows, and TeX are obtained this way.

PREV FileOps UP FileOps NEXT RCP