This is a short tutorial on FTP written on 03/13/2005. It is a ``tutorial by example''. If you read the FTP man pages and then copy from the example in this page you should be able to use FTP. FTP stands for ``File Transfer Protocol''. It is a tool to transfer files from one computer to another. In the most frequently used mode the user is logged in to one computer (the client) and has a login identity on the other computer (the server). In the example below I am logged in to marconi in the Internet Lab and I want to send files to, and get files from, maan.njit.edu. So in this case marconi is the client and maan is the server. Below follows a copy of what appeared on my screen in marconi. In marconi my home directory is (of course) /home/ott , but I was logged in to a subdirectory /home/ott/Balast . Beforehand I had created there a file called junk.03.13.05 which I was going to ftp to the ``Admin'' subdirectory of my home directory in the afs directory system: /afs/cad.njit.edu/u/o/t/ott/Admin . I started by typing ``ftp maan.njit.edu'' to tell marconi I wanted to be connected to maan: ---- [ott@marconi Balast]$ ftp maan.njit.edu Connected to maan.njit.edu. 220 maan.njit.edu FTP server (Version wu-2.6.2+Sun) ready. 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (maan.njit.edu:ott): ott 331 Password required for ott. Password: 230 User ott logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd Admin 250 CWD command successful. ftp> put junk.03.13.05 local: junk.03.13.05 remote: junk.03.13.05 227 Entering Passive Mode (128,235,32,243,64,208) 150 Opening BINARY mode data connection for junk.03.13.05. 226 Transfer complete. 21 bytes sent in 9.3e-05 seconds (2.2e+02 Kbytes/s) ftp> cd ~/public_html/CIS656/CIS656.S.05/ 250 CWD command successful. ftp> get README.txt local: README.txt remote: README.txt 227 Entering Passive Mode (128,235,32,243,67,165) 150 Opening BINARY mode data connection for README.txt (5199 bytes). 226 Transfer complete. 5199 bytes received in 0.013 seconds (3.8e+02 Kbytes/s) ftp> bye 221-You have transferred 5220 bytes in 2 files. 221-Total traffic for this session was 5997 bytes in 2 transfers. 221-Thank you for using the FTP service on maan.njit.edu. 221 Goodbye. [ott@marconi Balast]$ ---- Line 1 shows that ``ftp command''. In line 7 I had to give my login in maan. Sometimes the logins on client and server are different! In line 9 I had to type in my (afs) password. (My password for the server). Not shown! (Not echoed). I am told ``Binary Mode'' is used. That is good: otherwise I would type the command ``Bin''. At that point I am automatically ``in'' my home directory on maan. /afs/cad.njit.edu/u/o/t/ott . In line 13 I tell maan I want to be in the subdirectory ``Admin''. In line 15 I tell the two computers to move the file called ``junk.03.13.05'' from the subdirectory ``Balast'' in marconi to the subdirectory ``Admin'' in maan. It works. (I could have changed the name of the file, but did not.) In line 21 I tell maan I want to move to the subdirectory public_html/CIS656/CIS656.S.05 of my homedirectory (in maan). In line 23 I tell the computers I want to move the file ~/public_html/CIS656/CIS656.S.05/README.txt from maan to the current (Balast) directory in marconi. It works. In line 29 (bye) I tell the two computers I am done. They use 4 more lines to tell me nice things. Then I get the prompt back for /home/ott/Balast in marconi. Now you can use ftp. Unless this is ``old hat'' to you: ftp a file over from your computer at home to a computer at NJIT. ftp another file in the opposite direction. (Do not hand in!) Before the www became big we had ``anonymous ftp'' to make it possible for anybody to download from our account. ``Anonymous ftp'' still exists, but is much less often used than downloading from the web. It used to be I had to get IETF RFCs and ATM Forum papers (etc) by anonymous ftp. Times keep changing! Teun Ott.