File transfers using the ftp and rcp commands
Use the ftp command to copy a file from a remote host. The ftp command does not preserve file attributes or copy subdirectories. If either of these conditions are necessary, use the rcp command.
Item | Description |
---|---|
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 log off. |
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. |
Before attempting file transfer using the ftp and rcp commands, make sure the following conditions are true:
- You must have remote login permission specified in the remote host's $HOME/.netrc file
if the automatic login feature is to be used. Otherwise, you must know a login
name and password for the remote host. For more information about the .netrc file,
see Creating the .netrc file.
Alternatively, the system can be configured to use Kerberos V.5 authentication. This is used instead of the .netrc or $HOME/.rhosts files. See Authentication and the secure rcmds.
- If you wish to copy a file from a remote host, you must have read permission
for that file. Note: The read and write permissions for files and directories on a remote host are determined by the login name used.
- If you wish to copy a file from your local host to a remote host, you must have write permission for the directory that is to contain the copied file. Also, if the directory on the remote host contains a file with the same name as the file that you wish to place in it, you must have write permission to append the file on the remote host.