HPlogo Installing and Managing HP ARPA File Transfer Protocol Network Manager's Guide: HP 3000 MPE/iX Computer Systems > Chapter 4 Managing FTP

FTP User Commands on MPE/iX

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

The following quick reference provides the syntax and usage of the FTP user commands, listed in alphabetic order.

To stop a file transfer or directory listing in progress, you can [CTRL-Y].

You are prompted to exit FTP, cancel the transfer, or continue. From the FTP prompt you can exit by entering QUIT or pressing the [Break] key.

:mpecommand

From within an FTP session you can execute an MPE/iX command or program by entering a colon (:) followed by the command or program name. After the command is executed, or the program is exited, you are returned to your FTP session.

?

A synonym for the HELP command.

APPEND localfile [remotefile] [;buildparms]

Store data from localfile on the local system into remotefile on the remote system. If remotefile is not specified, localfile will be used as the remotefile name as well. If the remote file exists, the data will be appended to it; otherwise, the file will be created.

NOTE: If the remote file does not exist, this command behaves the same as PUT, and any specified build parameters (buildparms) will be used. But if the file already exists, any buildparms will be ignored.
ASCII

Sets the FTP file transfer type to ASCII. This is the default when you first enter the FTP program.

BINARY

Sets the FTP file transfer type to binary.

BYE

A synonym for the QUIT command.

BYTESTREAM (BYTE)

Sets the FTP file transfer type to binary.

CASE

When using the MPUT command, turns on or off the feature to force resulting filenames to lower case. When case is off, resulting file names are all upper case. The default is off.

CD remotedirectory

Changes the working directory on the remote host to the directory specified.

CLOSE

Closes the remote connection but remains in the FTP program.

DEBUG

Turns on or off the terminal screen display of the commands and parameters that are sent to the remote host. The default is off.

DELETE remotefilename

Deletes the remote file specified. A directory path may be included with remotefilename.

DIR [remotedirectory [localfile]]

Writes the requested remotedirectory listing to the terminal, or to a local file if specified. If remotedirectory is not specified, the current remote working directory contents are listed.

DISCONNECT

A synonym for the CLOSE command.

EXIT

A synonym for the QUIT command.

EXITONERROR

Turns on or off the feature to exit an FTP session when an error is detected. The last error and message are saved in system variables (enter SHOWVAR FTP@ to display). Useful for batch jobs using FTP commands. The default is off.

FORM [NONPRINT]

Sets the FTP file transfer form to the specified format. The only supported form is NONPRINT. Entering FORM without a parameter displays the supported format.

GET remotefile [localfile] [;buildparms] [;move]

Transfers the remote file specified to a local file. Build parameters may be used to change how the file is stored on MPE/iX. If a local file name is not specified, the file is saved with the same name as the remote file name (assuming a legal file name).

The move option requests that the specified source file be physically moved from the source location to the specified target location.

This is available for MGET, PUT and MPUT as well.

NOTE: The removal of the original source file may be guarded by file system security.
HASH

Toggles the state of the hash function within the ftp client. When the hash function is enabled, the "#" (hash) symbol will print to stdlist for every 1024 characters transferred during data transfer requests.

HELP [ftpcommand]

Displays a list of the valid FTP user commands. If an FTP user command is specified with HELP, a brief description of the command is displayed. You can also use the HELP command for information on specific FTP messages and errors, and the supported build parameters (buildparms).

LCD localdirectory

Changes the working directory on the local machine to the directory specified.

LS [remotedirectory [localfile]]

Displays the contents of a remote directory, one file per line. If a localfile name is specified, the listing will be saved to the file specified. If remotedirectory is not specified, the current remote working directory contents are listed.

MDELETE remotefiles

Delete multiple files on the remote system.

MGET remotefiles [;buildparms] [;move]

Retrieve multiple files from the remote system. Build parameters can be specified and apply to all files in the transfer. The resulting local files will have the same name as the remote files. Note that MPE/iX file names are exclusively upper case.

MKDIR remotedirectory

Creates a directory on the remote machine.

MODE [STREAM]

Sets the FTP file transfer mode to the specified mode. The only supported mode is STREAM. Entering MODE without a parameter displays the supported format.

MODTIME remotefile

Returns the last modification time and date of the remote file.

MPUT localfiles [;buildparms] [;move]

Transfer multiple files using wildcard characters in the localfiles parameter.

Optionally, build parameters can be specified if the remote system is an MPE/iX system. The build parameters affect each file in the transfer. Non-MPE/iX FTP servers will not interpret the build parameters as intended. The resulting file names are in upper case letters unless you use the CASE command to force the resulting file names to all lower case letters.

OPEN remotehostname

Opens a connection to the remote host specified. Must be either an ARPA domain name, IP address, or an NS node name.

PROMPT

Toggle interactive prompting. Interactive prompting is used during multiple file transfers to allow the user to selectively retrieve or restore files, and during multiple file deletes to selectively delete. If prompting is turned off, the default for MGET and MPUT is to transfer all files, and the default for MDELETE is to delete all files.

PUT localfile [remotefile] [;move]

Transfers a local file to a file on the remote system. If the remote file name is not specified, the file is saved with the local file name (assuming a legal file name). Optionally, build parameters can be specified if the remote system is an MPE/iX system.

PWD

Displays the name of the remote working directory on the terminal.

QUIT

Closes the connection to the remote system and exits from FTP.

QUOTE string

Sends server commands to the remote host. Used for troubleshooting.

RECV remotefile [localfile] [;buildparms]

A synonym for the GET command.

REMOTEHELP [servercommand]

Displays the remote host FTP server commands supported. If a server command is specified with the REMOTEHELP command, a brief description of the command is displayed. (Implementation dependent).

RENAME remotefile newname

Renames a remote file.

REPLACE

Toggles the internal replace flag and the value of the environment variable FTPREPLACE to either TRUE (on) or FALSE (off). This flag specifies the file placement policy during subsequent file transfers.

on

sets the internal replace flag and the value of the FTPREPLACE CI environment variable to TRUE (this is the default state). In this case, all file transfers will unconditionally replace the target file.

off

sets the internal replace flag and the value of the environment variable to FALSE. In this state, all file transfers will be conditional predicated on user response to replace the target file if it previously existed.

RESET

Clear reply queue. This command resynchronises command/reply sequencing with the remote FTP server. Resynchronisation may be necessary following a violation of the FTP protocol by the remote server.

RMDIR remotedirectory

Deletes a directory from the remote machine.

RUNIQUE

Toggle receive-unique mode. In receive-unique mode, all files stored on the local machine will be guaranteed to be created with a unique file name.

SEND localfile [remotefile]

A synonym for the PUT command.

SITE string

Asks remote server to perform a site-specific command. Type REMOTEHELP SITE for a list of commands supported by the remote server.

SIZE remotefile

Returns the size in bytes of the remote file.

STATUS

Display the status of the connection, the data type, whether each of verbose, debug, exit-on-error, prompting, lowercase, store-unique, receive-unique, tracing is on or off, plus the connection timeout value.

STRUCT [FILE]

Sets the FTP file transfer structure to the specified structure. The only supported structure is FILE. Entering STRUCT without a parameter displays the supported structure type.

SUNIQUE

Toggle store-unique mode. In store-unique mode, all files stored on the remote machine will be guaranteed to be created with a unique file name.

SYSTEM

Displays the remote system type.

TIMEOUT [num-secs]

The connection timeout value indicates how long to wait for a message from the remote FTP server before giving up. The allowable range is 0 to 3000. A value from 1 to 3000 indicates a timeout value in seconds. A value of 0 means no timeout (that is, wait forever). If num-secs is not specified, the current timeout value will be displayed. Otherwise, this command sets the connection timeout to num-secs seconds.

TRACE

If command is specified, toggle tracing.

TYPE [transfertype]

Sets the FTP file transfer type to the specified type. If a transfer type is not included, the current file transfer type is displayed. The supported transfer types are ASCII and BINARY. The default is ASCII.

USER username

Used to enter a logon name in order to establish a session on the remote host. A connection to the remote host must already have been established using OPEN.

VERBOSE

Turns on or off the display of responses from the remote host. The default is on.

Feedback to webmaster