Previous | Contents | Index |
This section provides complete descriptions of each R command. Included with each command description is the UNIX 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 as follows:
- 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 format or UNIX 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. This is needed only if the UNIX system has the name in its /etc/hosts.equiv file or in 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.
- 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 formats.
Table 3-2 Specifying Source Files with the RCP Command 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.Displays information about files as they are 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
/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.
/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.
/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. 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 its home directory on remote OpenVMS system HIAIR1, 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.
Note the use of quotation marks (" ") to specify 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 case letters).
Note the use of quotation marks (" ") to specify the SYS$LOGIN device and file name on the destination.
#5 |
---|
$ RCP /RECURSIVE ":DKA300:[MILES...]" "nyx:/usr/tmp" |
Copies all files and any subdirectories in local directory [MILES] to a remote UNIX host's destination directory. All the files in the subdirectories are copied as well, creating subdirectories as appropriate on the remote host. 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. That is, 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 that 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.
Sends a command line to a specified remote host for execution.The difference between the REXEC facility and RSH is security checking:
- REXEC --- The remote host bases authentication on the supplied user name and password.
- RSH --- The remote host bases authentication on user name and information in the remote system's authentication files.
To invoke the REXEC feature, enter one of the following:
RSH /PASSWORD=password
or
RSH /PASSWORD
See the RSH command with the /PASSWORD qualifier.
Initiates an interactive login session with a remote host.
RLOGIN /DROP_TIMEOUT=seconds host
[ /EIGHTBIT ]
[ /ESCAPE_CHARACTER=character ]
[ /LOG_FILE=file ]
[ /[NO]LOWERCASE ]
[ /PROBE_TIMEOUT=seconds ]
[ /TERMINAL_SPEED=baud ]
[ /TERMINAL_TYPE=type ]
[ /[NO]TRUNCATE_USER_NAME ]
[ /USER_NAME=remote_user_name])
rlogin host [ -8 ] [ -ec ] [ -l remote_user_name ]
host
Required.Remote host to which you want to connect.
/DROP_TIMEOUT=seconds
Required if you set /PROBE_TIMEOUT.Maximum interval, in seconds, that your network link can be down before the software closes it.
/EIGHTBIT
-8 (valid only on UNIX systems)
Optional. Default: only 7-bit data is sent.Accepts 8-bit data from the terminal and sends it to the remote system.
/ESCAPE_CHARACTER=character
-ec (valid only on UNIX systems)
Optional. Default: ~ (tilde).New escape character if you want to close your RLOGIN session from the remote host.
To close your session from your local host, use a period ( . ) as the escape command.
/LOG_FILE=file
Optional. Default: no logging.Logs a copy of the output to the specified file. Output continues to be directed to SYS$OUTPUT while it is being recorded in the log file.
/LOWERCASE
/NOLOWERCASE
Optional. Default: /LOWERCASE.Sends your local user name to the remote host in lowercase.
To send your user name in uppercase, do either of the following:
- Specify /NOLOWERCASE.
- Enclose the user name in quotation marks ( " " ). (See the /USER_NAME qualifier.)
To send your user name in mixed case, enclose it in quotation marks.
/PROBE_TIMEOUT=seconds
Required if you set /DROP_TIMEOUT.Interval, in seconds, that TCP/IP Services checks to see whether your network link and the remote host are still up.
/TERMINAL_SPEED=baud
Optional. Default: current speed of your terminal.Terminal speed in baud rate.
/TERMINAL_TYPE=type
Optional. Default: type of physical terminal you are using.Terminal type. Use this qualifier if the remote host does not recognize your terminal.
/TRUNCATE_USER_NAME
/NOTRUNCATE_USER_NAME
Optional. Default: /NOTRUNCATE_USER_NAME.Abbreviates the user name sent to the remote host to eight characters. (Required for older UNIX hosts, which limit user names to eight characters.)
/USER_NAME=remote_user_name
-l remote_user_name (valid only on UNIX systems)
Optional. Default: current name on local host, but in lowercase.Your user name on the remote host. Specify this qualifier if your user names on the remote host and local host are different.
To send your user name in uppercase, do either of the following:
- Specify /NOLOWERCASE.
- Enclose the user name in quotation marks ( " " ).
To send your user name in mixed case, enclose it in quotation marks.
#1 |
---|
$ RLOGIN /USER_NAME="BlissTon" ROLLS |
An OpenVMS user logs in to account BlissTon on UNIX host rolls . The mixed-case remote user name is enclosed in quotation marks so that RLOGIN does not send it all lowercase. This example assumes the user has a proxy account on the remote host.
#2 |
---|
$ RLOGIN /NOLOWERCASE /USER_NAME=DAVE PLETHORA |
User DAVE starts an interactive login session with UNIX host plethora . Because this user has an uppercase user name, it is specified with the /NOLOWERCASE qualifier. This example assumes the user has a proxy account on the remote host.
#3 |
---|
$ RLOGIN /ESCAPE_CHARACTER="+" PJARO [Return] Password: (password not echoed)[Return] Last login: Fri Aug 21 16:50:40 from world.wide.webber.com Compaq Tru64 System - 4: Tues Aug 25 11:02:20 EST 2002 You have mail. Tues Aug 25 11:02:20 EST 2002 pjaro> who [Return] black ttyp0 Aug 20 11:02 grades.philosophy.ucd.edu. bristow ttyp1 Aug 12 09:00 grades.biology.ucd.edu. cutler ttyp2 Aug 24 08:55 grades.math.ucd.edu. pjaro> pwd [Return] /usr/users/black pjaro> ls [Return] bin Sem1.paper Sem2.paper pjaro> +. (characters not echoed) %RLOGIN-S-REMCLOSED, Remote connection closed $ |
OpenVMS user BLACK, with UNIX user name black , logs in to UNIX host pjaro and resets the escape character to a plus sign. By default, TCP/IP Services passes the user name and commands to the remote host in lowercase.
#4 |
---|
$ RLOGIN FANTAC [Return] OpenVMS Version 7.3 - Unauthorized access is prohibited. Username: TDERR [Return] Password: (password not echoed) [Return] . . . $ |
User TDERR logs in to remote OpenVMS host FANTAC.
#5 |
---|
$ RLOGIN QANCE /DROP_TIMEOUT=45 %RLOGIN-E-INETERROR, Internet interface error -RLOGIN-I-INETCALL, setsockopt(TCP_DROP_IDLE) -SYSTEM-F-BADPARAM, bad parameter value $ |
The command fails because the /DROP_TIMEOUT and /PROBE_TIMEOUT qualifiers must both be set.
Sends a command to a remote host for execution, including a command that invokes a remote shell script or remote command procedure. Any command recognized by the remote host is valid. When using the RSH command, consider the following:
RSH host [/EIGHTBIT ] [ remote_command ]
[ /ESCAPE_CHARACTER=character ]
[ /LOG_FILE=file ]
[ /[NO]LOWERCASE ]
[ /PASSWORD[=password] ]
[ /[NO]SYSERROR ]
[ /TERMINAL_SPEED=n ]
[ /TERMINAL_TYPE=type ]
[ /USER_NAME=remote_user_name ]
rsh host [ -l remote_user_name ] [ remote_command ]
host
Required.Remote host at which you want the command to execute.
remote_command
Optional. Default: none.Command you are sending to the remote host for execution.
Note
The remote_command parameter must be the last item on the command line.
/EIGHTBIT
Optional. Default: only 7-bit data is sent.Accepts 8-bit data from the terminal and sends it to the remote system.
/ESCAPE_CHARACTER=character
Optional. Default: Tilde (~).RSH escape character. This character lets you exit the RSH process without entering the remote host's typical logout sequence, such as LOGOUT or Ctrl/D.
Typing the escape character and a period (.) breaks the connection with the remote host. For example:
remote> ~. (characters not echoed) %RSH-S-LCLCLOSED, Local connection closed local_vms>/LOG_FILE=file
Optional. Default: no logging.Logs a copy of the output to the specified file. Output continues to be directed to SYS$OUTPUT while it is being recorded in the log file.
Not valid with /SYSERROR.
/LOWERCASE
/NOLOWERCASE
Optional. Default: /LOWERCASE.Sends your local user name to the remote host in lowercase letters.
To send your user name in uppercase letters, do one of the following:
- Specify /NOLOWERCASE.
- Enclose the user name in quotation marks ( " " ). (See the /USER_NAME qualifier.)
To send your user name in mixed case, enclose it in quotation marks ( " " ).
/PASSWORD[=password]
Optional.Your password on the remote host.
Invokes the local REXEC facility that directs your RSH command to the REXEC server on the remote host. This server does authentication checking using the user name and password that you specified on the RSH command line.
- Enclose the password in quotation marks ( " " ) if it is lowercase or mixed case.
- If you omit password, RSH (REXEC) prompts you for one.
- Do not use this qualifier if you want to initiate an RLOGIN session.
Directs diagnostics to SYS$ERROR and output to SYS$OUTPUT.
When SYS$ERROR and SYS$OUTPUT both output to the same terminal, the output might be garbled.
/NOSYSERROR directs output only to SYS$OUTPUT.
/TERMINAL_SPEED=n
Optional. Default: your terminal's current speed.Terminal speed passed to the remote host during an RLOGIN session.
/TERMINAL_TYPE=type
Optional. Default: your terminal's current type.Terminal type passed to the remote host during an RLOGIN session.
/USER_NAME=remote_user_name
-l remote_user_name (valid only on UNIX systems)
Optional. Default: same name on local host, but in lowercase letters.Your user name on the remote host. Specify this qualifier if your user names on the remote host and local host are different.
To send your user name in uppercase letters, do one of the following:
- Specify /NOLOWERCASE.
- Enclose the user name in quotation marks ( " " ).
To send your user name in mixed case, enclose it in quotation marks ( " " ).
#1 |
---|
$ RSH HENCE MAN CP cp(1) Name cp - copy file data Syntax cp [ -f ] [ -i ] [ -p ] file1 file2 . . . See Also cat(1), pr(1), mv(1) $ |
A user sends the man cp command to UNIX host hence for execution.
#2 |
---|
$ RSH /USER_NAME=ROGERS DELPHI LS |
OpenVMS user PHILIPS enters the ls command for execution at remote UNIX host delphi . PHILIPS is accessing an account called rogers .
#3 |
---|
$ RSH /PASSWORD=BLOOMER AVOC8N DIRECTORY |
OpenVMS user PANTO sends the DIRECTORY command to remote OpenVMS host AVOC8N. The remote directory listing is of PANTO's home directory.
RSH /PASSWORD invokes REXEC, which authenticates PANTO's remote password.
#4 |
---|
$ RSH /PASSWORD MAGIC CAT BUZZ.TXT REXEC password: (password not echoed)[Return] |
A user sends the cat command to host magic . /PASSWORD invokes REXEC, which requires a password. Because the password was omitted from the command line, REXEC prompts the user for it.
Previous | Next | Contents | Index |