VMS Help RCP *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Copies files between internet hosts. Enter the RCP command at the DCL prompt. You can copy files: o From a remote host to your host o From your host to a remote host o From one remote host to another remote host You can specify qualifiers in either DCL-style format or UNIX style format, but do not mix both types on the same command line. DCL-Style Format RCP [qualifier(s)[...]] source_file destination_file [/[NO]LOG ] [ /PASSWORD[=password] ] [ /[NO]PRESERVE ] [ /[NO]RECURSIVE ] [ /[NO]TRUNCATE_USER_NAME[=n] ] UNIX Style Format rcp [ -p ] [ -r ] /[source_file] /[destination_file] This format is valid only on UNIX systems.
1 - Parameters |
source_file Required. Source host and file specification, in the format "[username@]"host:file, where: o username@ is the user name on a remote UNIX system, needed only if the UNIX system has the name in its /etc/hosts.equiv file or the UNIX user's .rhosts file. Enclose the username@ portion, or the entire specification containing the username@ syntax, in quotation marks (" "). o host is the remote host, followed by a colon (:). o file is the name of the file to copy. A file name without the full path specification defaults to the default (or home) directory. RCP Command: Specifying the Source File shows the possible correct formats. Table 1 RCP Command: Specifying the Source File Host Possible Formats UNIX hosts Specify the following, enclosing UNIX path names that include slashes (/) in quotation marks (" "): o Absolute path name, such as /etc/user/hosts, followed by the file name RCP/USER_NAME="jjones"/PASSWORD="letmein" STATS.TXT - sysair:"/usr/users/jamesj/stats.txt" o Path name relative to your default directory, followed by the file name RCP/USER_NAME="jjones"/PASSWORD="letmein" STATS.TXT - sysair:"~jamesj/stats.txt" OpenVMS Specify the following: hosts o Brackets ([ ]), which indicate your default directory, followed by the file name RCP/USER_NAME=JJONES/PASSWORD=LETMEIN OUR.DOC SYSAIR:[]GROUP.DOC o Full file specification, such as DKA0:[WILDE.BIRDS.NORTHERN]CHAPTER1.TXT To specify a device name, enter a colon (:) and then the name. Enclose the entire parameter within quotation marks (" "). RCP/USER_NAME=JJONES/PASSWORD=LETMEIN CHAP1.TXT - SYSAIR:"DKA0:[WILDE.BIRDS.NORTHERN]CHAPTER1.TXT" o A logical name, such as SYS$LOGIN:ROBIN.DAT or DIAK$9:[AMERICAN]FINDINGS.LIS To specify a logical name, enter a colon (:) and then the name. Enclose the entire parameter within quotation marks (" "). RCP/USER_NAME=JJONES/PASSWORD=LETMEIN CHAP1.TXT - SYSAIR:"SYS$LOGIN:CHAPTER1.TXT" destination_file Required. Destination host and file specification information is of the same form as the source parameter, unless the file specification is completely omitted or the file name portion of the file specification is omitted. In these cases, the default file name used is the same as specified in the source parameter, the directory being the default/home directory of the user.
2 - Qualifiers |
2.1 - /LOG
/LOG /NOLOG Optional. Default: no logging. Logs the files copied to or from the local system.
2.2 - /PASSWORD
/PASSWORD=password Required if /USER_NAME qualifier is used. Password on the source or destination host system (whichever requires authentication).
2.3 - /PRESERVE
/PRESERVE /NOPRESERVE Optional. Preserves the file protection mode and modification date during a copy. The creation date and modification date of the output file are set to the modification date of the input file. The dates are truncated to the second on transfer. When these dates are displayed on OpenVMS, the "hundredths of a second" field will always be zero. When a file is created by RCP/PRESERVE on an OpenVMS system running TCP/IP Services, WRITE permission on the input file grants both WRITE and DELETE permission on the output file.
2.4 - /RECURSIVE
/RECURSIVE /NORECURSIVE Optional. Recursively copies each subtree rooted at the directory you specify in the UNIX file specification. For OpenVMS hosts, specify [directory...] (with three trailing periods) in the file specification instead of using this qualifier.
2.5 - /TRUNCATE_USER_NAME
/TRUNCATE_USER_NAME[=n] /NOTRUNCATE_USER_NAME Optional. Default: no truncation. Truncates the user name to the specified number of characters. If you omit n, the default is eight characters.
2.6 - /USER_NAME
/USER_NAME=remote_user_name Optional. Default: current name on local host in lowercase. Specify user name on the source or destination remote host. Use only if an entry allowing access to this user has not been added to the remote host's authentication files. You must also specify the /PASSWORD qualifier with the /USER_NAME qualifier. If necessary, truncate the user name to the required number of characters using the /TRUNCATE_USER_NAME qualifier. Specifying "username@" with the source or destination parameter is the equivalent UNIX style method.
3 - Examples |
1.$ RCP/LOG NYX:STATS.BNT [] Copies file stats.bnt from remote UNIX system nyx from under its home directory to a local file of the same name in the current directory. The /LOG qualifier causes information for the copy to be displayed. This command assumes the user has an entry in the authentication file on host nyx. 2.$ RCP HIAIR1:AIRFRS.TXT [FLTAT.STATS]FARES1.TXT Copies file AIRFRS.TXT from remote OpenVMS system HIAIR1, from under its home directory to a local file of a different name (FARES1.TXT) in the specified directory. This command assumes the user has an entry in the authentication file on host HIAIR1. 3.$ RCP /PRESERVE HIAIR1:[FARES.SUMMER]FARES_SU.TXT ":DKA300:[]" Copies file FARES_SU.TXT from directory [FARES.SUMMER] on remote OpenVMS system HIAIR1 to the specified device and directory on the local system. The new file maintains the same name as the original. The copy preserves the source file's protection mode and modification date. Use quotation marks (" ") for specifying the device and directory on the destination. 4.$ RCP /USER=MILLER /PASS="AirOut" ":SYS$LOGIN:PILOTS.LIS" FALCON: Copies file PILOTS.LIS from the login directory of user MILLER on the local system to the user's login directory on a remote UNIX system. The user specifies the user name and password for access to the UNIX system (the password is specified in quotation marks to preserve the mixed uppercase letters). Use quotation marks (" ") for specifying the SYS$LOGIN device and file name on the destination. 5.$ RCP /RECURSIVE ":DKA300:[MILES...]" "nyx:/usr/tmp" Copies all files and any subdirectories under the local directory [MILES] to a remote UNIX host's destination directory. All the files in the subdirectories are copied as well, creating subdirectories on the remote host, as appropriate. The directory hierarchy is preserved on the UNIX host by default. This command assumes the user has an entry in the authentication file on host nyx. 6.$ RCP /LOG /RECURSIVE [MILES...] BOSTON:[FRFL...] Copies the complete local subdirectory tree ([MILES...] and all subdirectories) to the destination directory on remote OpenVMS host BOSTON, while preserving the directory hierarchy and logging each file copy. This command assumes the user has an entry in the authentication file on host BOSTON. 7.$ RCP /LOG /RECURSIVE [MILES...] BOSTON:[FRFL] Same as Example 6, except that all files in the local directory tree are copied directly to the destination directory itself. The command does not preserve the directory hierarchy of [MILES...] in [FRFL] on host BOSTON. In other words, the command does not create new subdirectories in BOSTON:[FRFL]; it copies all the files in [MILES] and all its subdirectories to directory [FRFL]. 8.$ RCP /USER=VAUGHN /PASSWORD=MYLES /TRUNCATE=6 STATS.TXT FRAM:TISTICS Copies the local file STATS.TXT to a remote user's login directory. Note the truncation of the remote user name. A user name and password are necessary if no entries for the user are present in the remote host's authentication files. 9.$ RCP BOSTON:NAMES.LIS FRAM:ROSTER.LIS Copies file NAMES.LIS from remote host BOSTON to remote host FRAM (naming the file ROSTER.LIS). Assumes appropriate entries for the user have been made in each remote host's authentication files. 10$ RCP "MILLER@BOSTON:SYS$DIR:T2.TXT" "nelson@nyx:/usr/nelson/T2.TXT" Copies file T2 from remote OpenVMS system BOSTON in the directory pointed to by the logical name SYS$DIR to remote UNIX system nyx in the specified directory. Different user names are used on the two remote systems. Entries in the remote host's authentication files must be set up properly because the passwords are not being passed. 11$ RCP /USER=ROSS /PASSWORD=LC12LC BOS:CLIENT.LIS "BEX:/usr" Copies file CLIENT.LIS from OpenVMS host BOS to UNIX host bex. The user has a proxy account on the UNIX host. The specified authentication information allows access to the account for ROSS on host BOS.
|