Using the network

Transferring files

While working on your own machine, you may decide that you want a copy of a new calendar file that exists on the remote machine seattle. If you simply want to copy a file from one machine to another, you do not need the kind of terminal session that telnet provides; instead, you can use ftp(TC), a file transfer program.

Give the ftp command with the name of the other machine:

ftp seattle

ftp connects to the other machine and prompts for a user name. If you want to log in with the default user name shown in parentheses within the prompt, simply press <Return>; otherwise, enter a user name on the remote machine. Then, enter the password for the user on the remote machine.

   Connected to seattle.
   220 seattle FTP server (Version 4.160 #9 Mon Mar 27 08:35:11 PST 1989) ready.
   Name (seattle:rsimpson):
   331 Password required for rsimpson.
   230 User rsimpson logged in.
When your user name and password are verified, you can enter ftp commands at the prompt. ftp displays several messages about what it is doing, because it operates in verbose mode by default. If you prefer not to see these extra messages, you can toggle verbose mode off by entering the verbose command at the ftp prompt. (The rest of the ftp examples in this guide were created with verbose mode turned off.)

To copy the file calendar94 from the other machine to your machine, use the get command followed by the file's pathname on the remote machine and the pathname on your machine where you want ftp to place the file:

   ftp> get /usr/local/bin/calendar94 /u/rsimpson/bin/calendar94
ftp places a copy of the remote file calendar94 in your home bin directory on the local machine. In verbose mode, ftp notifies you when your local machine has received the new file, specifying the number of bytes transferred and how much time the transfer took.

The put command, which works just like get, allows you to copy a file from your machine to the remote machine. The syntax is:

put source destination

source is the pathname of the file on your machine that you want to copy; destination is the pathname on the remote machine where you want to put the file.

The ftp program has many other commands. At the ftp prompt, you can enter ``?'' to see a list of available commands (see the ftp(TC) manual page for descriptions). To end the ftp session, enter quit to disconnect from the remote machine.

Next topic: Running commands remotely
Previous topic: Logging in to a remote machine

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003