computer science II
c m s c 214  
s p r i n g   2 0 0 2  

ftp

I want my "ftp". This was the cry of the 80's which lead to the famous UNIX utility, "ftp"! Do you know what it stands for? "ftp" stands for (it stands for file transfer protocol).

Here's the instructions. (You type in what's in red).

  1. Assume you are at a WAM computer in the same directory as the file you wish to transfer, and you have a UNIX prompt.
  2. Type in ftp dc.umd.edu. You will see something like
    Connected to dc.umd.edu.
    220 holmes.umd.edu FTP server (Digital UNIX Version 5.60) ready.
    Name (dc.umd.edu:janplane): 
    
  3. Type in your user name (suppose it's zz214123).
    Connected to dc.umd.edu.
    220 holmes.umd.edu FTP server (Digital UNIX Version 5.60) ready.
    Name (dc.umd.edu:janplane): zz214123
    331 Password required for zz214123.
    Password:
    
  4. Then, type in your password.
  5. If you make a mistake, you will see:
    Connected to dc.umd.edu.
    220 holmes.umd.edu FTP server (Digital UNIX Version 5.60) ready.
    Name (dc.umd.edu:janplane): zz214123
    331 Password required for zz214123.
    Password:
    Login failed.
    ftp> 
    
  6. Since you are in "ftp", you will need to use a different command to tell ftp your username. Use the "user" command, as in:
    Connected to dc.umd.edu.
    220 holmes.umd.edu FTP server (Digital UNIX Version 5.60) ready.
    Name (dc.umd.edu:janplane): zz214123
    331 Password required for zz214123.
    Password:
    Login failed.
    ftp> user zz214123
    331 Password required for zz214123.
    
  7. Again, it asks you for your password. If you succeed, you will see:
    Connected to dc.umd.edu.
    220 holmes.umd.edu FTP server (Digital UNIX Version 5.60) ready.
    Name (dc.umd.edu:janplane): zz214123
    331 Password required for zz214123.
    Password:
    Login failed.
    ftp> user zz214123
    331 Password required for zz214123.
    Password:
    230 User zz214123 logged in.
    ftp> 
    
  8. At this point, you can type in SOME basic UNIX commands like "ls" and "cd". Initially, you start off in the home directory of the account you logged into. If you are in the incorrect "remote" directory (the account you just logged into), then use "cd" to get in the correct directory.
  9. Use the "mput" (which stands for multiple put) command.
    ftp> mput proj1.ps
    mput proj1.ps?
    
    It asks you if you want to put the file in the remote directory. Type 'y', and hit return.
  10. It tells you how many seconds it took to transfer.
  11. Once done, type "quit" and hit return.
    ftp> mput proj1.ps
    mput proj1.ps? y
    200 PORT command successful.
    150 Opening ASCII mode data connection for proj1.ps (128.8.129.123,34138).
    226 Transfer complete.
    local: proj1.ps remote: proj1.ps
    1234 bytes sent in 0.0348 seconds (3.31 Kbytes/s)
    ftp> quit
    221 Goodbye.
    
You should have your file.

"ftp" works in both directions. Suppose you are in your class account, and wish to retrieve your file from your WAM (or other account). You do the same thing as above (except you would ftp to WAM), and instead of using "mput", you would use "mget".

Using Wildcards

You can use wildcards to transfer many files at a time. For example, to transfer all files that end in .ps.
ftp> mput *.ps
mput proj1.ps? y
Or to transfer all files in the directory.
ftp> mput *
mput proj1.ps? y
You can use question mark to match any one character.

You will be asked if you want to send each of the file, one at a time. Type 'y' for YES, and 'n' for NO.

Remember to quit when you are done.

Using lynx

If you want to try something on your own, learn to use lynx. This is a text based browser, that can save text files. It should run on the DC cluster. That way, you don't have to FTP.