dcp(1dn) — Commands
Digital
NAME
dcp − Copy files between DECnet-Plus nodes
SYNOPSIS
dcp [-options] input output
FLAGS
-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 Digital UNIX systems, it 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-Digital UNIX systems.
-c Converts the input file name from another type of system to a name with a Digital UNIX format. This conversion hppens by default whenever you use dcp to copy a file from some other type of system to a Digital UNIX system. The -c option has no effect unless the output file is in a local directory; you cannot use this option when copying files to remote directories.
-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 Digital UNIX systems.
-r Copies all of the files in a directory. All subdirectories are also copied. The input and output names you specify must be directory names. The top directory must already exist; -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-Plus systems.
-record_format When copying files to a VMS system, this switch allows you to specify the record format of the created file. It must have one of the following values: undefined, fixed, variable, vfc, stream, stream_lf, stream_cr. Must be used with the -i switch.
-record_size When copying files to a VMS system, this switch allows you to specify the record size file attribute of the created file. Must be used with the -i switch.
-v Logs the names of the files being copied to standard error.
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. If there are multiple input files, separate each with a blank space.
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-Plus for Digital UNIX Introductory User’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.
When you copy input files to a directory, the output files retain the input file names and syntax unless you use the -c option. However, if you are copying a file other than a Digital UNIX file to a Digital UNIX system, the file name is automatically converted to match Digital UNIX file-naming conventions.
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-Digital UNIX files with additional attributes lose those attributes when copied to an Digital UNIX system.
When you use dcp to copy a file to another DECnet-Plus system, you need not specify a mode of transfer because image mode is the default transfer mode between Digital UNIX systems. For other systems, you need to specify a mode of transfer only for image files.
File protection modes are preserved when you copy files between DECnet-Plus systems. For other systems, the output file protection modes are defined by the remote system’s file protection defaults.
When you copy files from another type of system to an Digital UNIX directory without using the file name conversion option, the output file name retains the format of the input file name. (By default, however, a file copied from a OpenVMS system is automatically converted to Digital UNIX file naming conventions.) In other cases, you can use the -c option to convert the file names.
RESTRICTIONS
You cannot use the -c option to convert file names when copying files between Digital UNIX systems.
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 local:.davis/mango/fruity::’dra2:[mango]farm.lis’ The following command copies the file FARM.LIS from the remote OpenVMS node LOCAL:.DAVIS to the local DECnet-Plus node. However, the output file name is not converted to lowercase because the user specifies the cnolower flag. dcp -cnolower local:.davis::’dra2:[mango]farm.lis’ . The following command copies the file x.dat to the OpenVMS node VMS1, creating a file of fixed length 23 byte records. dcp -i -record_format fixed -record_size 23 x.dat VMS1::
RELATED INFORMATION
DECnet-Plus for Digital UNIX Introductory User’s Guide