The fcp command can transfer a remote
file to the local host, or a local file to a remote host. From your
local host, you can also use fcp to copy files between two remote
hosts, or make a local copy.
About fcp |
 |
The fcp command is patterned after rcp, a Berkeley
service that copies files between UNIX hosts on a network. With
fcp, you can create a copy (either local or remote) of an existing
file (either local or remote). When fcp completes a copy operation,
your local host redisplays its prompt.
When you work with remote files, the working directory for
fcp on the remote host is a default directory that depends on the
remote FTAM implementation. For HP-UX FTAM responders, it is your
remote home directory.
Using fcp |
 |
The syntax for the fcp command is as follows:
fcp source_file [-X | -z source_access] dest_file [-X | -z dest_access] |
The source_file is the file to be copied,
and dest_file is the destination to which the
file is to be copied. If you are familiar with the HP-UX cp command,
you will notice the similarity. However, for fcp, the source and
destination files can be either local or remote.
The options manage file protection. The -X
option gives you exclusive access to the file during the copy. The
-z option can
be used to satisfy more stringent file protection requirements.
File protection is the subject of Chapter 5 “FTAM File Protection”
 |
 |  |
 |
 | NOTE: Whether a file is local or remote depends on how you
specify the file name. See "Specifying File and Directory
Names" earlier in this chapter. |
 |
 |  |
 |
In this example, a user known as betty
uses fcp to create a copy of the local file localplan
in her home directory on a remote HP-UX host called chicago:
$ fcp localplan chicago:localplan Password (chicago:betty): $ |
Note that you are prompted for betty's password at chicago.
Creating a .ftamrc
file may allow you to bypass this prompt.
In fcp file transfers, you must explicitly specify both the
source and destination file names. Directory names and wildcards
are not allowed for either source or destination.