HPlogo HP ARPA File Transfer Protocol User's Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Getting Started: A Simple FTP Session

FTP Session Example

» 

Technical documentation

» Feedback

 » Table of Contents

 » Glossary

 » Index

To follow the same steps as the example, make sure you have the following:

  • Remote logon name and passwords

  • Remote system internet protocol (IP) address

  • Create or have available a simple text file of type ASCII to transfer to the remote system.

Step 1: Run FTP

After you have entered your MPE/iX user account, enter:

:FTP.ARPA.SYS

A banner similar to the following is displayed:

Transfer Protocol [A0002001] (C) Hewlett-Packard Co. 1995
ftp>

Step 2: Connect and Log into the Remote Host

At the ftp> prompt, enter the OPEN command followed by the remote host IP address:

ftp> OPEN 123.50.43.21
220 sysname FTP server (Version $Revision: 15.14 $ $Date: 89/09/23 11:35:11 $) ready.

Enter the remote user account and password when prompted:

Name (username) myname
331 Password required for myname.
PASSWORD: (enter password)
230 User myname logged in.
ftp>

Step 3: View Your Local Directory

Enter the MPE/iX command LISTF, preceded by a colon (:) as follows:

ftp> :LISTF,2
		ACCOUNT = PUB           GROUP = MYGROUP]
FILENAME   	CODE               -----------LOGICAL RECORD-------­­----
                              SIZE      	TYP     	 EOF      	LIMIT
		NSCREEN1                      		256B      	FA       	800      	10000
NSCREEN2		                       80B      	FA       500	      14000
		NSPROGX PROG		                  1934W	     VB      	4551	       9480
		README                         		80B      	FA       500	      14000

Step 4: Transfer a File from MPE/iX to the Remote Host

Select a simple ASCII text file, for example, README from your list of files. Transfer your local file to the remote host file named readme1 using the PUT command as follows:

ftp> PUT README readme1
200 PORT command okay.
150 Opening data connection for readme1 (123.50.42.32,50894)
226 Transfer complete
nnn bytes sent in n.nn seconds: (nn.nn Kbytes/sec)

Step 5: View the Remote Directory

Enter the DIR command at the ftp>prompt. A listing of the files in the remote working directory is displayed. The file you transferred should be in the list. In this example, readme1 is the third file in the listing.

ftp> DIR
200 PORT command okay.
150 Opening data connection for /bin/ls -l (123.50.42.32,50895) (0 bytes). total 13
-rw-rw-rw-         1 myname      guest       10       Feb 13 18:44       cathy1
-rw-rw-rw-         1 myname      guest      100       Feb 12 18:42       cathy2
-rw-rw-rw-         1 myname      guest      110       Feb 13 18:43       readme1
226 Transfer complete
nnn bytes received in n.nn seconds (n.nn Kbytes/sec)

Step 6: Transfer a File from the Remote Host to MPE/iX

From the remote directory listing, choose an ASCII type file to transfer. For this exercise, you could use the file you just transferred and copy it back to your local system with a new name.

Enter the GET command followed by the name of the remote file you want to transfer and then the filename you want to copy into on your local system. For example:

ftp> GET readme1 README2
200 port command okay.
150 Opening data connection for readme2 (123.50.42.32,50896) (2997 bytes).
226 Transfer complete.
nnn bytes received in n.nn seconds: (n.nn Kbytes/sec)

You can verify that the file transferred to your account by entering a :LISTF command:

ftp> :LISTF,2
ACCOUNT = PUB           GROUP = MYGROUP]
FILENAME   	CODE               -----------LOGICAL RECORD-------­­----
                              SIZE      	TYP     	 EOF      	LIMIT
		NSCREEN1                      		256B      	FA       	800      	10000
NSCREEN2		                       80B      	FA       500	      14000
		NSPROGX PROG		                  1934W	     VB      	4551	       9480
		README                         		80B      	FA       500	      14000
		README2                        		80B      	FA       500	      14000

Step 7: Exiting the FTP User Program

When you are finished transferring files or performing directory operations, enter QUIT.

ftp> QUIT
221 Goodbye.
END OF PROGRAM
:

When you issue a QUIT command, you are logged off the remote host, and the remote connection is closed. You are returned to your MPE/iX session prompt.

The Next Step

The previous example showed the steps for a simple file transfer session. The Chapter 4 “Using FTP” section, provides more detailed task descriptions of the steps you followed in the simple session, and other features of FTP.

The Chapter 2 “FTP User Commands: Quick Reference” section, provides syntax and brief command descriptions for FTP listed in alphabetic order.

Feedback to webmaster