Previous | Contents | Index |
The PUT command does the following:
- Copies local files to a remote host.
- Copies files to a DECnet node.
File names are copied in lowercase without version numbers.
To use this command, you must have an FTP session with a remote host.
PUT
[ /qualifier(s)* ] local_file [ remote_file])
*Choose from the following qualifiers:
[ /CONFIRM ]
[ /CONVERT ]
[ /FDL ]
[ /RAW] ] )
put local_file [ remote_file ]
send local_file [ remote_file ]
mput local_files
local_file
Required.Name of the local file to copy.
- To specify multiple files, separate the names with commas.
- To use wildcards, enable parsing (See ENABLE PARSE command).
- put file_name.ext --- Copies the latest version
- put file_name.ext;* --- Copies all versions
- To copy a file to a remote DECnet node, use the full specification:
nodename, device, directory, file name.remote_file
Optional. Default: same name, same case, no version number (UNIX systems).Name of the new file on the remote host. You cannot use wildcards.
/CONFIRM
Optional. Default: immediate execution. The /CONFIRM qualifier must follow immediately after the PUT command without a space.Asks you for confirmation before executing the copy operation.
/CONVERT
Optional.Translates the internal file-formatting characters of Variable Forms Control (VFC) files. The /CONVERT qualifier must follow immediately after the PUT command without a space.
/FDL
Optional. Default: no secondary file created. The /FDL qualifier must follow immediately after the PUT command without a space.Creates a secondary file with the file's OpenVMS record attributes. The SET TYPE command determines the type of file:
- Specifying ASCII results in a sequential file with variable records. Select this type when transferring ASCII text files.
- Specifying IMAGE results in a sequential file with fixed records of 512 bytes. Select this type when transferring non-ASCII files such as executable image files.
/RAW
Optional.Maintains block mode of files regardless of the TCPIP$FTP_RAW_BINARY logical name definition. The /RAW qualifier must follow immediately after the PUT command without a space.
#1 |
---|
FTP> PUT SALES.LIS;* 200 PORT command successful 150 Opening ASCII mode data connection for sales.lis.2 (130.180.4.8,1028) 226 Transfer complete local: DISK3$:[TRANS]SALES.LIS;2 remote: sales.lis.2 3634 bytes sent in 00:00:00.01 seconds (394.31 Kbytes/s) 200 PORT command successful 150 Opening ASCII mode data connection for sales.lis.1 (130.180.4.8,1029) 226 Transfer complete local: DISK3$:[TRANS]SALES.LIS;1 remote: sales.lis.1 3634 bytes sent in 00:00:00:01 seconds (394.31 Kbytes/s) FTP> |
Copies all versions of the local file SALES.LIS to the remote UNIX host.
- File names are copied in lowercase.
- OpenVMS file version numbers become the last element of the copied files.
- Semicolons are converted to periods.
- If the Store Unique feature is toggled on (sunique), then when you copy a file to an OpenVMS host, the host FTP server gives the file a new, unique version number. When you specify the version number of a file to be copied (PUT) to a remote UNIX host, the file retains the version number on the remote host, with the semicolon (;) replaced by a period (.). The UNIX host adds another version number to the file name as well. For example, if you PUT file BASES.TMP;2 to a UNIX host, the file name on the UNIX host will be bases.tmp.2.1.
#2 |
---|
FTP> PUT/FDL STAT.BCK "cygnet.bck" 200 PORT command successful 150 Opening data connection for cygnet.bckfdl (130.180.4.8,1028) 226 Transfer complete local: cygnet.bckfdl remote: cygnet.bckfdl 21700 bytes sent in 00:00:00.03 seconds (662.23 Kbytes/s) 200 TYPE set to IMAGE 200 PORT command successful 150 Opening data connection for cygnet.bck (130.180.4.8,1029) 226 Transfer complete local: STAT.BCK remote: cygnet.bck 8152 bytes sent in 00:00:00.12 seconds FTP> |
Copies the local file STAT.BCK to a UNIX host, giving the copy the name cygnet.bck. Also creates a secondary file with the RMS record attributes of file cygnet.bckfdl.
Sends your input directly to the remote host. Lets you use FTP commands that are implemented by the remote host but not known to the local host.To use the QUOTE command, you must have an FTP session with a remote host. The QUOTE command is not valid for file transfer.
For a list of commands implemented by the remote host, enter:
FTP> HELP/REMOTE
QUOTE command_line
quote command_line
command_line
Required.Remote command you want to execute.
FTP> QUOTE CDUP 250 CWD command successful. FTP> |
FTP sends the cdup command to the UNIX host to change the remote directory up one level.
Renames a remote file. To use this command, you must have an FTP session with a remote host.
RENAME old_name new_name
rename old_name new_name
old_name
Required.File name on the remote host to rename.
new_name
Required.New name for the remote file.
#1 |
---|
FTP>ls BEARS bears your.doc.1 sports.txt.txt STUDENTS.LIS 226 Transfer complete. 265 bytes received in 00:00:00.00 seconds (64.69 Kbytes/s) FTP> RENAME STUDENTS.LIS TEST_STUDENTS.LIS 350 File exists, ready for destination name 250 RNTO command successful. FTP> |
This example shows how to use the RENAME command to rename a file on a UNIX system.
#2 |
---|
FTP> RENAME STUDENT.LIS TEST_STUDENT.LIS 350 File WORK1$:[VANA[STUDENT.LIS; will be renamed. 250 File WORK1$:[VANA]STUDENT.LIS;1 renamed to WORK1$:[VANA]TEST_STU DENT.LIS;1 FTP> |
This example shows how to rename a file that exists on an OpenVMS system.
Sets your default directory on either the remote host or the local host. To set the default directory on a remote host, you must have an FTP session with a remote host.
SET DEFAULT [ /LOCAL ] directory
cd directory
lcd directory
directory
Required.Name of the directory to which to change the default.
/LOCAL
Optional. Default: remote.Changes the working directory on the local host.
#1 |
---|
FTP> SET DEFAULT "/USR/USERS/ROLLINGS" 250 CWD command successful. |
Changes the remote working directory to /usr/users/rollings.
#2 |
---|
FTP> SET DEFAULT ~ 250 CWD command successful. 250 New default directory is /USR/USERS |
Changes the remote working directory back to the default login directory.
#3 |
---|
FTP> SET DEFAULT /LOCAL USER$1:[PRESS.CHECK] Local Directory now USER$1:[PRESS.CHECK] |
Changes your local working directory to USER$1:[PRESS.CHECK].
Sets maximum tolerance level for errors:
- ERROR --- FTP tolerates errors and warnings, and will not exit when running in batch mode.
- SUCCESS --- The default; FTP does not tolerate errors and will exit when running in batch mode.
- WARNING --- FTP tolerates warnings and will not exit when running in batch mode.
SET ERROR_LEVEL error_level
error_level
Required.Severity of errors tolerated. Specify ERROR, SUCCESS, or WARNING. The default is SUCCESS.
FTP> SET ERROR_LEVEL ERROR Error level is ERROR. |
Sets the error level tolerance to ERROR.
Defines the data representation type:
- ASCII --- Appropriate for text files (default).
- IMAGE --- Appropriate for transferring binary files,such as executable images.
SET TYPE type
type type
type
Required.Data representation type. Specify ASCII or IMAGE. If you do not use the SET TYPE command, the default is SET TYPE ASCII.
FTP> SET TYPE IMAGE 200 Type set to I. |
Sets the data representation type to IMAGE for files you transfer during the current FTP session.
Displays the name of the working directory on the remote host or the local host. To use the SHOW DEFAULT command to display the working directory on the remote host, you must have an FTP session with a remote host.
SHOW DEFAULT [ /LOCAL ]
pwd
/LOCAL
Optional. Default: remote directory.Displays the local working directory.
#1 |
---|
FTP> SHOW DEFAULT 257 "/usr/staff/hurry/items" is current directory. |
Displays the name of the working directory on the connected remote host.
#2 |
---|
FTP> SHOW DEFAULT /LOCAL Local directory is WORKS$:[CROWE]. |
Displays the name of the working directory on the local host.
Displays the current FTP parameter settings and, if you have an open connection, the name of the connected host and parameter settings relative to the connection.
SHOW STATUS
status
#1 |
---|
FTP> SHOW STATUS 211-FTP Server Status. 211-SITE set to +VMS+. 211-TYPE set to ASCII. 211-STRU set to FILE. 211-MODE set to STREAM. 211 Multiline responses are enabled. Connected to: HANKS.ABC.UCB.EDU VMS Plus mode enabled Mode = stream , Type = ascii, Form = non_print, Structure = file Error level is SUCCESS Reply display is on Parsing is on Prompting is off Port command is on Case: Filenames will be transferred in lowercase |
Displays the status of the connection with remote OpenVMS host HANKS. By default, FTP sets VMS Plus Mode for rapid file transfers between two OpenVMS systems running TCP/IP Services for OpenVMS.
#2 |
---|
FTP> status 211-eagle.store1.equip.com FTP server status: Version 5.60 Connected to eagle.store1.equip.com Logged in as jones TYPE: Image; STRUcture: File; transfer MODE: Stream 211- No data connection 211 End of status Connected to: eagle VMS Plus mode disabled Mode = stream , Type = image, Form = non_print, Structure = file Error level is SUCCESS ) |
Displays the current FTP parameters, which control data transfers with the connected UNIX host, eagle.
Suspends your current FTP session and runs the DCL command that you type.
SPAWN [ command ]
! [ command ]
#1 |
---|
FTP> SPAWN SHOW DEFAULT SYS$LOGIN_DEVICE:[PERCY.DISTR] |
Interrupts your FTP process to display your default directory.
#2 |
---|
FTP> ! SHOW DEFAULT WORK1$:[VANA.FTP] FTP> |
You can also use the ! to spawn a command.
Displays the contents of a file onto your current output device.
VIEW [ /PAGE ] filespec
view filespec
filespec
Required.Specifies the file to be displayed. Wildcard characters (*, %) are not allowed in place of the directory name, file name, file type, or file version number field.
/PAGE
Optional.Displays one screen at a time until the end of file (EOF) is reached. You can terminate the display at any time by pressing Ctrl/Z.
#1 |
---|
FTP> VIEW FUNDING.TXT |
Scrolls through the contents of the FUNDING.TXT file, in the current working directory, and displays the contents on the current output device.
#2 |
---|
FTP> VIEW/PAGE FUNDING.TXT |
Displays the contents of the FUNDING.TXT file, one screen at a time, on the current output device.
The Remote (R) commands provided by the DIGITAL TCP/IP Services for OpenVMS software allow you to work in accounts on remote internet systems also supporting the Remote (R) protocols. You can also enter commands, shell scripts, and command procedures to these remote host systems without logging in to the hosts. These R commands include RCP (Remote Copy), RLOGIN (Remote Login), RSH (Remote Shell), and REXEC (Remote Execute, invoked by RSH). You enter these commands at your system command line prompt.
The following table lists the Remote (R) commands and services, the functions you can perform, and the sections that explain how to use them.
Capability | Section |
---|---|
Remote copy (RCP command):
Copy a file between the local host and a remote internet host Copy a file between two remote internet hosts |
3.4 |
Remote login (RLOGIN): Log in to an account on a remote host | 3.5 |
Remote command or shell execution (RSH): Send a command to, or invoke a shell script or command procedure on a remote host | 3.6 |
Remote command or shell execution with authentication (REXEC facility (using RSH/PASSWORD)): Using your user name and password for authentication, execute a command, shell script, or command procedure at a remote host | 3.7 |
To use the Remote (R) commands, you need access to an account on the remote host, which is granted by either of the following:
Table 3-1 summarizes the Remote (R) commands (for complete command descriptions, see Section 3.8).
Function/Command | Description |
---|---|
RCP | Copies files between the local host and a remote host or between two remote hosts. Authentication is performed on the remote host or hosts using the user name supplied by RCP or authentication or proxy files. |
RLOGIN | Connects to the remote host, which starts an interactive login session. Authentication is performed on the remote host using the user name supplied by RLOGIN. |
RSH | Connects to the remote host, which executes the command you specified. Authentication is performed on the remote host using the user name supplied to RSH. |
RSH/PASSWORD | Uses the REXEC facility to connect to the remote host, which executes the command you specified. Authentication is performed on the remote host using the user name and password supplied by RSH. |
To use a remote command on your OpenVMS system, remote hosts need to know the user name that you want to use on the host. You can provide the user name in either of two ways:
The remote host must also know your password or know you as a trusted user on your local system through a proxy or authentication:
$ RSH WOODS /PASSWORD="Downy" LS |
$ RSH WOODS /PASSWORD DIR REXEC password: (password not echoed) |
|
Previous | Next | Contents | Index |