dcp(1dn)
NAME
dcp − copy files between DECnet nodes
SYNTAX
dcp [ options... ] input output
where
−A appends the input file or files to a specified output file. Note that the output file must already exist; this option does not create an output file.
−P prints the files at the default printer on the remote system.
−S submits remote output files for execution. On ULTRIX systems, the −S option submits output files to the shell and creates a log file in the log-in directory that has the name filename.log, where filename is the name of the specified output file.
−a copies files in ASCII record mode. ASCII mode transfers perform necessary format conversions between heterogeneous systems. ASCII mode is the default when you copy to and from non-ULTRIX systems.
−c converts the input file name of a non-ULTRIX system to a name with an ULTRIX format. Note that this option is not necessary if you specify an output file.
−d prints debugging information in the form of Data Access Protocol (DAP) message traces to stderr.
−i copies files in image mode. This option is useful for copying nonprintable data files between homogeneous systems. Image mode transfers are generally faster than ASCII mode transfers but do not perform data format conversions between heterogeneous systems. Image mode is the default when you copy between ULTRIX systems.
−r copies all of the files in a directory. All subdirectories are also copied. The input and output names you specify must be names of directories. Note that the top directory to which you are copying must already exist; dcp −r does not create it. However, this option does create all the subdirectories if they do not already exist on the node to which you are copying files. This option is valid only between DECnet-ULTRIX systems.
−v logs the names of the files being copied to stderr.
input is one or more input file or directory specifications. The format for an input file specification varies with the operating system on which the file is located.
You can specify a dash (−) in place of an input file specification, directing dcp to read from standard input until it reaches end-of-file (EOF).
You can specify wildcard characters. If you want the target node instead of the local shell to interpret a string of wildcard characters, you must enclose the string in quotation marks. See the DECnet-ULTRIX User’s and Programmer’s Guide for more information.
output is the output file or directory to which dcp copies the input files. The format for an output file or directory specification varies with the operating system on which the output file is created. See the DECnet-ULTRIX User’s and Programmer’s Guide for a description of all DECnet file specifications and wildcard characters.
When you copy input files to a directory, the output files retain the input file names and syntax unless you use the −c option.
You can use a dash (−) in place of the output file specification to direct the files to standard output.
DESCRIPTION
The dcp command copies files between DECnet nodes. You can copy both ASCII text and binary image files. Note that non-ULTRIX files with additional attributes lose those attributes when copied to an ULTRIX system.
When you use dcp to copy a file to another DECnet-ULTRIX system, you need not specify a mode of transfer because image mode is the default transfer mode between ULTRIX systems. For non-ULTRIX systems, you need to specify a mode of transfer only for image files.
File protection modes are preserved when you copy files between DECnet-ULTRIX systems. With non-DECnet-ULTRIX systems, the output file protection modes are defined by the remote system’s file protection defaults.
When you copy files from a non-ULTRIX system to an ULTRIX directory without using the file name conversion option, the output file name retains the format of the input file name. For example, a file copied from a VMS system appears in uppercase with an extension and a version number. However, if you use the file name conversion option, the same file appears in lowercase without the version number, and any dollar ($) characters are converted to underscore (_) characters.
EXAMPLES
The following command copies the local file farm.3 to the directory [MANGO] on device DRA2: on the remote DECnet-VAX node DAVIS; the command names the new file FARM.LIS. The access control information is /mango/fruity.
% dcp farm.3 davis/mango/fruity::’dra2:[mango]farm.lis’
The following command copies the file FARM.LIS from the remote DECnet-VAX node DAVIS to the local DECnet-ULTRIX node. Note that because neither a new file name is specified nor the −c option used, an ls of the local directory would show that the output file name is still in VAX/VMS format (uppercase with version number).
% dcp davis::’dra2:[mango]farm.lis’ .