Although it is possible to send relatively short files using electronic mail, there are more efficient ways of transferring large files. Electronic mail programs are usually designed to transmit relatively small amounts of text; therefore, other means are needed to transfer large files effectively. The ftp, rcp, and tftp commands rely on TCP/IP to establish direct connections from your local host to a remote host. Basic Network Utilities (BNU) can also use TCP/IP to provide direct connections with foreign hosts.
The ftp command allows you to copy a file from a remote host. It does not preserve file attributes or copy subdirectories. If either of these conditions are necessary, use the rcp command.
ftp | Uses the File Transfer Protocol (FTP) to transfer files between hosts that use different file systems or character representations, such as EBCDIC and ASCII. It provides for security by sending passwords to the remote host and also permits automatic login, file transfers, and logoff. |
rcp | Copies one or more files between a local host and a remote host, between two separate remote hosts, or between files at the same remote host. This command is similar to the cp command except that it works only for remote file operations. If extra security is needed for your network, this command is disabled by the system manager. |
Alternatively, the system can be configured to use Kerberos V.5 authentication. This is used instead of the .netrc or $HOME/.rhosts files. More information about this can be found in the section on Understanding the Secure Rcmds.
Note: The read and write permissions for files and directories on a remote host are determined by the login name used.
ftp HostName
If you have automatic login permission, information similar to the following appears on your local host:
Connected to canopus.austin.century.com. 220 canopus.austin.century.com FTP server (Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready. 331 Password required for dee. 230 User dee logged in. ftp>
Otherwise, information similar to the following displays on your local host. Type your login name and password when prompted by the system.
Connected to canopus.austin.century.com. 220 canopus.austin.century.com FTP server (Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready. Name (canopus:eric): dee 331 Password required for dee. Password: 230 User dee logged in. ftp>
ftp
When the ftp> prompt is displayed, type:
open HostName
If you have automatic login permission, the following information appears on your local host:
Connected to canopus.austin.century.com. 220 canopus.austin.century.com FTP server (Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready. 331 Password required for dee. 230 User dee logged in. ftp>
Otherwise, information similar to the following displays on your local host. Type your name and password when prompted by the system.
Connected to canopus.austin.century.com. 220 canopus.austin.century.com FTP server (Version 4.1 Sat Nov 23 12:52:09 CST 1995) ready. Name (canopus:eric): dee 331 Password required for dee. Password: 230 User dee logged in. ftp>
You are now ready to copy a file between two hosts.
To copy a file from a remote host to a local host, use the following steps:
binary
get FileName
The file is placed in the directory from which you issued the ftp command.
To copy a file from a local host to a remote host, use the following steps:
binary
put FileName
The tftp and utftp commands use the Trivial File Transfer Protocol (TFTP) to transfer files to and from hosts. Because TFTP is a single-file transfer protocol, the tftp and utftp commands do not provide all the features of the ftp command. If extra security is required for your network, the system manager can disable this command.
Note: The tftp command is not available when your host is operating at a high level of security.
tftp host1
In this example, host1 is the name of the host to which you wish to connect.
status
A message similar to the following appears:
Connected to host1 Mode: netascii Verbose: off Tracing: off Remxt-interval: 5 seconds, Max-timeout: 25 seconds tftp>
get /home/alice/update update
The /home/alice directory on the remote host must have read permission set for others. In this example, the /home/alice/update file is transferred from host1 to the update file in the current directory on the local system.
quit
or use the Ctrl-D key sequence.
tftp host1
In this example, host1 is the name of the host to which you wish to connect.
status
A message similar to the following appears:
Connected to host1 Mode: netascii Verbose: off Tracing: off Remxt-interval: 5 seconds, Max-timeout: 25 seconds tftp>
put myfile /home/alice/yourfile
The /home/alice directory on the remote host must have write permission set for others. The myfile file, located in the user's current working directory, is transferred to host1. The path name must be specified unless a default has been established. The myfile file appears on the remote host as yourfile.
quit
or use the Ctrl-D key sequence.