Previous | Contents | Index |
Use quotation marks (" ") for UNIX host path names that include slashes (/), such as user/simms/offers, and for user/host specifications that include the username@hostname syntax.
If the remote host uses case-sensitive user names and passwords, use quotation marks in the following situations:
The following examples show how to provide account and password information for the R commands.
$ RCP UFEMISM:ACCNTS [] [Return] $ |
$ RLOGIN /USER_NAME=CRIS UFEMISM [Return] Welcome to UNIX system ufemism. . . . ufemism% |
$ RSH /NOLOWERCASE UFEMISM CAT -N GRANTS |
$ RSH /PASSWORD="MagNificat" CLASSICS LS [Return] |
You can specify R command qualifiers in either of two ways:
$ RCP /LOG TRANQUIL:VULTURES [] $ RSH /EIGHTBIT /ESCAPE_CHAR="+" /TRUNCATE HERON CAT -N STREAMS |
$ ! To customize my R commands: $ ! $ RCP :== RCP /LOG $ RLOGIN :== RLOGIN /EIGHTBIT/ESCAPE_CHAR="+" /TRUNCATE_USER_NAME $ RSH :== RSH /EIGHTBIT /ESCAPE_CHAR="+" /TRUNCATE_USER_NAME $ ! |
You can obtain online help for the Remote commands by entering the following command:
$ HELP TCPIP_SERVICES REMOTE_COMMANDS |
You can also obtain information for a specific R command by entering one of the following commands:
$ HELP RCP $ HELP RLOGIN $ HELP RSH $ HELP REXEC |
The RCP (Remote Copy) command copies a file between your local host and a remote internet host. You can also use RCP to copy a file between two remote internet hosts. You specify the source and destination file names, each in the format appropriate for the source or destination system. For copying files from one remote host to another:
By using the /RECURSIVE qualifier with the RCP command, you can recursively copy every file and subdirectory in a directory.
You can also use the COPY/RCP command to copy files across the network using TCP/IP. For more information on this command, enter HELP COPY/RCP at the DCL prompt.
Note that you can also use FTP to transfer files. To determine the best
file transfer service to use for your needs, see Section 1.1.1. For
more information about FTP, see Chapter 2.
3.4.1 Example RCP Commands
The following examples show how to use RCP commands to copy files from one host to another host:
$ RCP /PASSWORD="IMusici" "haven:/symph/nine" [][Return] |
$ RCP "musicx:/symph/pastoral" ":DKA300:[SYMPH6]" [Return] |
$ RCP/RECURSIVE "haven:/symph" ":DKA300:[SYMPHS]" [Return] |
$ RCP /PASSWORD="IMusici" "musicx:/symphonies/*" "haven:/symph/*" [Return] |
$ COPY/RCP haven"BEST IMusici"::"/symph/*" [Return] To: FRAM"VAUGHN MYLES"::[classic.compositions]*" |
The RLOGIN (Remote Login) command connects your terminal to the remote host you specify and requests a login. If the remote host has an entry in its authentication files for your host and user name, it may bypass its login and password prompts. (See Section 3.1.)
Note that you can also use TELNET to log in to remote internet hosts.
To determine the best remote login service to use for your needs, see
Section 1.1.2. For more information about TELNET, see Chapter 4.
3.5.1 Logging Out
End your remote login session in either of two ways:
The default escape character is a tilde ( ~ ). To set another escape
character, use the /ESCAPE_CHARACTER qualifier on the RLOGIN command
line.
3.5.2 Example RLOGIN Sessions
The following examples show how to use the RLOGIN command.
$ RLOGIN CONDO [Return] CONDO - Unauthorized access is prohibited Username: KING [Return] Password: (password not echoed) [Return] Welcome to OpenVMS (TM) Alpha Operating System, Version V7.1 on node CONDO Last interactive login on Thursday, 24-SEP-1998 15:20:29.60 Last non-interactive login on Wednesday, 23-SEP-1998 14:25:04.12 $ RUN ... $ ~. (characters not echoed) %RLOGIN-S-LCLCLOSED, Local connection closed $ |
$ RLOGIN /ESCAPE_CHARACTER="+" PETREL [Return] . . . Last login: Mon Mar 14 18:34:27 from phoebe.edu UNIX System petrel: Fri Mar 19 11:02:20 EST 1997 Mon Jun 28 18:44:42 EST 1997 % ls ... [Return] % +. (characters not echoed) %RLOGIN-S-REMCLOSED, Remote connection closed $ |
The RSH (Remote Shell) command connects your terminal to a remote host and requests it to execute the command, script, or command procedure that you specify. If the command generates output, you see it as if it were produced locally. If you omit a remote command when you enter an RSH command line, RSH initiates an RLOGIN session. However, if the command line includes /PASSWORD, the remote login attempt fails. Using the /PASSWORD qualifier invokes REXEC. (See Section 3.7.)
Syntax rules require that you enter your RSH command line so that the
remote command is the last word (or phrase).
3.6.1 Quotation Marks in Commands
If the remote command is one or more lowercase words, you do not need to enclose them in double quotation marks on the RSH command line. However, double quotation marks ( " " ) are required for:
In addition, RSH handles one double quotation mark ( " ) and two consecutive double quotation marks ( "" ) as follows:
To stop a remote execution, enter either Ctrl/C or Ctrl/Y.
3.6.3 Example RSH Commands
The following examples show how to use the RSH command.
$ RSH /USER_NAME=ROLLY OSTER LS |
$ RSH DEBTS LS "-R" |
$ RSH DEBTS ECHO TEST MESSAGE test message $ RSH DEBTS ECHO "\""test\"" message" "test" message $ RSH DEBTS ECHO TEST MESSAGE test message $ RSH DEBTS ECHO "TEST" MESSAGE TEST message $ RSH DEBTS "echo '""test"" message'" "test" message |
$ RSH MOON01 [Return] Password: (password not echoed)[Return] Last successful login for jjones: Fri Sep 25 10:58:31 1998 from nebula Last unsuccessful login for jjones: Fri Sep 25 11:59:43 1998 on ttyp5 Digital UNIX V5.0 (Rev. 148); Tue Apr 7 18:32:54 EST 1998 Digital Equipment Corporation Internal Use Only moon01> |
$ RSH WR2 DIRECTORY |
$ RSH WR2 /USER=ROGERS DIRECTORY |
Use the REXEC feature to send a command to execute on a remote host that does not have, or might not have, the authentication information that RSH requires. The remote system's authentication files are not used.
Along with the remote command, REXEC sends the password you specify on the command line to the remote host. This password is used for security checking.
The Remote Shell program invokes REXEC. To use REXEC, enter RSH
/PASSWORD.
3.7.1 Example REXEC Use
The following example shows how to provide password information for the RSH command, thereby invoking the REXEC feature on the remote host.
From host GRANT, user STANTON enters the file tops.holdings that resides on UNIX host oster. Because STANTON is not listed in oster's authentication files, user STANTON must use the REXEC feature and supply the /USER_NAME and /PASSWORD qualifiers. Quotes are required around the password because it contains uppercase letters.
$ RSH OSTER /USER_NAME=STANTON /PASSWORD="KeepingSaneJoy" - _$ CAT TOPS.HOLDINGS |
This section provides complete descriptions of each R command. Included with each command description is the UNIX style equivalent of the command. These equivalents are valid on UNIX systems only. They are presented here for users who are familiar with the UNIX environment, to help them understand the nature of R commands.
Copies files between internet hosts. Enter the RCP command at the DCL prompt. You can copy files:
- From a remote host to your host
- From your host to a remote host
- 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.
RCP [qualifier(s)[...]] source_file destination_file
[/[NO]LOG ]
[ /PASSWORD[=password] ]
[ /[NO]PRESERVE ]
[ /[NO]RECURSIVE ]
[ /[NO]TRUNCATE_USER_NAME[=n] ]
rcp [ -p ] [ -r ] /[source_file] /[destination_file]
This format is valid only on UNIX systems.
source_file
Required.Source host and file specification, in the format "[username@]"host:file, where:
- 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 (" ").
- host is the remote host, followed by a colon (:).
- file is the name of the file to copy. A file name without the full path specification defaults to the default (or home) directory. Table 3-2 shows the possible correct formats.
Table 3-2 RCP Command: Specifying the Source File Host Possible Formats UNIX hosts Specify the following, enclosing UNIX path names that include slashes (/) in quotation marks (" "):
- 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"
- 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 hosts Specify the following:
- Brackets ([ ]), which indicate your default directory, followed by the file name
RCP/USER_NAME=JJONES/PASSWORD=LETMEIN OUR.DOC SYSAIR:[]GROUP.DOC
- 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"
- 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.
/LOG
/NOLOG
Optional. Default: no logging.Logs the files copied to or from the local system.
/PASSWORD=password
Required if /USER_NAME qualifier is used.Password on the source or destination host system (whichever requires authentication).
/PRESERVE (OpenVMS Style)
/NOPRESERVE
-p (UNIX style, valid only on UNIX systems)
Optional.Preserves the file protection mode and modification date during a copy.
/RECURSIVE (OpenVMS Style)
/NORECURSIVE
-r (UNIX style, valid only on UNIX systems)
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.
/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.
/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.
#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 |
Previous Next Contents Index