HP ARPA File Transfer Protocol User's Guide (36957-90159)

Chapter 3 25
Getting Started: A Simple FTP Session
FTP Session Example
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