This manual describes the use of the MadGoat FTP client software.
Revision/Update Information: This is a revised manual. Revision bars indicate changes made since the last version of this software.
Operating System and Version: OpenVMS VAX V5.0 or later
OpenVMS Alpha V1.5 or later
Software Version: MadGoat FTP V2.6-1
Permission is granted to copy and redistribute this document for no commercial gain.
The information in this document is subject to change without notice and should not be construed as a commitment by MadGoat Software. The authors and MadGoat Software assume no responsibility for any errors that may appear in this document.
DISCLAIMER: The software described in this document is provided "as is." No guarantee is made by the authors or MadGoat Software as to the suitability, reliability, security, usefulness, or performance of this software.
The following are trademarks of Digital Equipment Corporation:
| AXP | VAX | DEC | OpenVMS |
| VMS | UCX | VAXcluster | VMScluster |
MultiNet is a registered trademark of Process Software Corp.
TCPware is a trademark of Process Software Corp.
WIN/TCP and PathWay are registered trademarks of Attachmate, Inc.
| Contents |
FTP (File Transfer Protocol) is a TCP/IP subsystem that allows users to transfer files between a local system and remote systems.
MadGoat FTP began life as the FTP client and server that were distributed with CMU-Tek TCP/IP, a mostly-free TCP/IP implementation written by Tektronix and Carnegie-Mellon University and supported by CMU. When the code was made freely available, support was picked up primarily by Henry Miller and John Clement.
MadGoat FTP is based on John and Henry's CMU FTP V3.1. The MadGoat version works with the NETLIB TCP/IP Interface Library, which means that the MadGoat FTP will run under any TCP/IP software supported by NETLIB. The following TCP/IP products are currently supported by NETLIB: TGV's MultiNet, Digital's DEC TCP/IP Services for OpenVMS, Process Software's TCPware, Wollongong's WIN/TCP and Pathway, and CMU-IP.
The NETLIB port was done by Darrell Burkhead, who based some of the changes on a much earlier UCX port (known as CRUX) done by Matt Madison. The OpenVMS Alpha port was done by Hunter Goatley.
NETLIB must be installed before you can use the MadGoat FTP. NETLIB is written by Matt Madison and is also a MadGoat Software product.
MadGoat FTP is currently maintained by Hunter Goatley, VMS Systems Programmer for MadGoat Software, Bowling Green, KY (goathunter@PROCESS.COM).
This manual is intended for all OpenVMS users running the MadGoat FTP client. The reader should be familiar with FTP principles.
This guide consists of two chapters and two parts.
| Chapter 1 | Provides a description of the MadGoat FTP client. |
| Chapter 2 | Provides a description of the MadGoat FTP server used by remote FTP clients. |
| Part II | Provides the DCL command description for the FTP command. |
| Part III | Provides a command dictionary for the MadGoat FTP client. |
The CMU client and server were originally written by:
The MadGoat version was written by:
FTP is a TCP/IP subsystem that implements the File Transfer Protocol for transferring files between a local system and one or more remote systems on an internet. The FTP client, invoked by the DCL command FTP, establishes a network link to an FTP server on the remote system. When the connection is established, you must log in to an account on that remote system. Once logged in, files can be transferred to and from the remote system, depending on the type of access allowed.
The term anonymous FTP is used frequently in reference
to files available on the Internet. Anonymous FTP refers to a special
kind of guest login using a remote ``anonymous'' account. Only files
set up for anonymous access can be retrieved from those systems; most
anonymous ftp servers do not allow files to be copied to the remote
system.
1.1 Invoking FTP
The FTP client is started by executing the DCL command ``FTP''. The remote host name may be specified on the command line, in which case the FTP client automatically establishes a connection to the remote FTP server.
Depending on how your system is configured, the FTP command may be a normal DCL command verb (i.e., placed in the system-wide DCLTABLES), or it may be set up as a foreign command like:
$ ftp :== $madgoat_exe:ftp.exe |
If neither of these works, contact your VMS system manager.
If no host name is given on the DCL command line, a banner is displayed and the FTP client prompts you for input with ``FTP> '':
$ FTP MadGoat FTP client V2.6-1 for OpenVMS Alpha (16-MAR-2000) FTP> |
The FTP> prompt is displayed when there is no connection to a remote FTP server. As soon as a connection is made, the FTP prompt changes to indicate the remote server. For example, if ``ftp.spc.edu'' is specified on the command line, the prompt becomes FTP:ftp.spc.edu>, as shown here:
$ ftp ftp.spc.edu MadGoat FTP client V2.6-1 for OpenVMS Alpha (16-MAR-2000) Attempting to connect to host ftp.spc.edu <220 spcvxa.spc.edu MultiNet FTP Server Process 3.2(14).... FTP:ftp.spc.edu> |
The MadGoat FTP client now supports host aliases. Whenever a hostname is given, a database of alias names is checked. If a match is found, then the alias information is used. Alias information can include: the hostname, username, account, password, and an initial command. For more information on aliases, see ALIAS.
After connecting to a remote host, the MadGoat FTP client will prompt for a username and attempt to login if the MADGOAT_FTP_USER_PROMPT logical name is defined. |
On-line help is available from either FTP prompt. To invoke it, just type HELP. Some commands, such as LOGIN, require that the connection to the remote server already be established; these commands are not valid at the FTP> prompt. Example 1-1 shows a sample FTP session, with explanations for the various commands used.
| Example 1-1 Sample Anonymous FTP Session |
|---|
(1)$ ftp ftp.spc.edu MadGoat FTP client V2.6-1 for OpenVMS Alpha (16-MAR-2000) (2)Attempting to connect to host ftp.spc.edu (3)<220 spcvxa.spc.edu MultiNet FTP Server Process 3.2(14) at .... (4)FTP:ftp.spc.edu> user anonymous (5)<331 anonymous user ok. Send real ident as password. Password: (6)<230-Guest User SIMMONS@FAKE.BOGUS.COM logged into USER7:[ANONYMOUS] at ... <230 Directory and access restrictions apply (7)FTP:ftp.spc.edu> cd macro32.savesets <250 Connected to USER7:[ANONYMOUS.MACRO32.SAVESETS]. (8)FTP:ftp.spc.edu> dir dcl* (9)<200 Stru F ok. <200 Port 26.154 at Host 136.165.253.27 accepted. <150 List started. USER7:[ANONYMOUS.MACRO32.SAVESETS] (10)DCLKEYS.ZIP;1 32 22-DEC-1992 16:58 ARCHIVES (RWED,RWED,RE,RE) DCL_RECALL.ZIP;1 43 17-JUN-1993 08:53 ARCHIVES (RWED,RWED,RE,RE) Total of 75 blocks in 2 files. <226 Transfer completed. 230 bytes (1 block) in 00:00:08.12 = 28 cps, IO=2 (11)<200 Stru O VMS ok. (12)FTP:ftp.spc.edu> get dclkeys.zip <200 Port 26.155 at Host 136.165.253.27 accepted. <150 VMS retrieve of USER7:[ANONYMOUS.MACRO32.SAVESETS]DCLKEYS.ZIP;1 started. <226 Transfer completed. 16342 (8) bytes transferred. (13)16342 bytes (32 blocks) in 00:00:23.23 = 703 cps, IO=30 Received file dclkeys.zip to (Local) DCLKEYS.ZIP;1 (14)FTP:ftp.spc.edu> exit <221 QUIT command received. Goodbye. Transfer Okay; Connection Closing $ |
During file transfers, you can check the status of the transfer at any time by pressing either [CTRL-A] or [CTRL-T]. Pressing [CTRL-A] during a transfer causes the display of lines like the following:
FTP:wkuvx3> put [hunter]ftp.alpha_exe <200 Port 161,6,5,4,99,64 Okay. <150 VMS Store of FTP.ALPHA_EXE;1 Started; Opening data connection. [CTRL-A] [sending file user:[hunter]ftp.alpha_exe;1 to ftp.alpha_exe] 127088 bytes (249 blocks), 60%, in 00:00:03.74 = 33981 cps, IO=63 |
The information shown includes the number of bytes transferred up to the time that [CTRL-A] is pressed, the number number of blocks, the total percentage of the file transferred, the elapsed time of the transfer, the number of characters transferred per second, and the number of I/O requests.
Pressing [CTRL-T] causes the lines above to be displayed, in addition to the process information normally displayed by [CTRL-T].
When a file is PUT to any system, the status information will always contain the percentage of the file transferred. When GET is used, the percentage may or may not be shown, depending on the type of server on the remote system. The MadGoat FTP client can show the percentage when STRU VMS is used and when connected to most UNIX systems. Most UNIX FTP servers will display the size of the file in bytes in the informational message when the transfer is started:
<150 Opening ASCII mode data connection for lynx.txt (5384 bytes). |
As long as the number of bytes is displayed in the format above, the
MadGoat FTP client can calculate the percentage transferred.
1.4 Command Parsing and Case
The MadGoat FTP client uses the VMS CLI$ routines to parse the commands you enter. However, because many FTP sites are UNIX systems that are case-sensitive with regard to filenames, the client will, by default, attempt to preserve the case of any command parameters you enter. For example, to change your directory to the UNIX subdirectory ``Mail'', just specify the appropriate case on the CD command:
FTP:unix> CD Mail <250 CWD command successful. FTP:wkunix.wku.edu> |
Similarly, when communicating with a server on a case-sensitive system, you can specify the remote file name in mixed-case and the client will preserve the case:
FTP:wkunix.wku.edu> put descrip.mms Makefile <200 PORT command successful. <150 Opening ASCII mode data connection for Makefile. <226 Transfer complete. 748 bytes (2 blocks) in 00:00:00.12 = 6233 cps, IO=1 Sent file WKU$USER:[HUNTER]DESCRIP.MMS;1 to (Remote) Makefile FTP:wkunix.wku.edu> |
A potential problem when communicating with UNIX servers is that directory specifications include the slash character (/). The CD command will accept them without any problems:
FTP:wkunix.wku.edu> cd /pub/VMS |
However, for all other commands, such file specifications must be enclosed in double quotes (") to prevent the command parser from interpreting the slash as the beginning of a command qualifier:
FTP:wkunix.wku.edu> cd /usr/goathunter <250 CWD command successful. FTP:wkunix.wku.edu> put login.com /usr/goathunter/login.com Unrecognized qualifier - check validity, spelling, and placement \USR2\ FTP:wkunix.wku.edu> put login.com "/usr/goathunter/login.com" <200 PORT command successful. <150 Opening ASCII mode data connection for /usr/goathunter/login.com |
When transferring files to any non-VMS system, the MadGoat FTP client will, by default, automatically attempt to determine if the file is an ASCII or BINARY file and set up the transfer appropriately. You can override this action by specifying one of the commands ASCII or BINARY. You can also use SET NOCHECK_TYPE to disable the autosensing of the file type.
Most operating systems see files as just a stream of bytes. However, the VMS file system is more complex and saves information about the structure of the file: how records are accessed (indexed files), the keys for indexed files, record lengths, print information, etc. All such attributes are lost when the file is transferred from VMS to a non-VMS system.
There are several parameters that are negotiated between the local FTP utility and the remote server. They are Type, Mode, and Structure. These parameters are used to specify some of the file attribute information.
When transferring files between two VMS systems, the file attributes are usually automatically saved. This is because most VMS FTP servers and clients, including MadGoat FTP, support ``STRU VMS'', an FTP structure setting that says, ``transfer all file attributes, in addition to the data stored in the file.'' The FTP client will automatically negotiate with the remote server to determine if it supports STRU VMS; if it does, then STRU VMS is automatically used for all file transfers.
More information can be found in Part 3.
This chapter discusses the FTP server process that is created when a remote FTP client logs into your account on the local VMS system. The options described here are available if, when you connect to your VMS system from a remote system, a banner like the following is displayed:
220-alpha.wku.edu MadGoat FTP server V2.6-1 for OpenVMS Alpha (16-MAR-2000) ready. |
Your system manager may have elected not to use the MadGoat FTP
server; if another server is used, please consult the documentation for
that server.
2.1 The MadGoat FTP Server Process
When a remote FTP client logs into your account on the local VMS system, a network process is created under your username. When the process is created, it executes your LOGIN.COM file, usually located in SYS$LOGIN:. The server may fail to log in properly due to problems in your LOGIN.COM. For example, if your LOGIN.COM sets the process name and you are already logged in, an error will occur. It is strongly recommended that you add a command sequence like the following to your LOGIN.COM file.
$ IF F$MODE() .EQS. "NETWORK" $ THEN $ ! Here define just network logicals $ EXIT $ ENDIF $! Rest of LOGIN.COM continues.... |
With those lines in place, only a portion of your LOGIN.COM will be
executed by the FTP server process and you can avoid executing commands
that might adversely affect the network login.
2.2 FTP Server Log Files
By default, no log file is created when a remote FTP client is used to log in to your account. You can cause a log file named FTP_SERVER.LOG to be created in your default login directory (SYS$LOGIN:) by defining the logical MADGOAT_FTP_LOG. This log file will contain information about the FTP session.
Your system manager may have already enabled logging system-wide. If
so, you can override that value by defining a process logical. For more
information about using the MADGOAT_FTP_LOG logical, see Section 2.3.2.
2.3 MadGoat FTP Server Logicals
You can define various logicals in your LOGIN.COM to control the FTP
server process that is created when a remote FTP client logs in to your
account. The logicals only need to be defined for network logins; you
can control that with commands in your LOGIN.COM, as shown in
Section 2.1,
2.3.1 MADGOAT_FTP_DIRS
You can restrict access to certain directories by defining the logical MADGOAT_FTP_DIRS. For example, the following line in your LOGIN.COM would prevent access to all subdirectories except the [.MAIL] subdirectory:
$! Restrict FTP access to just two directories
$ define madgoat_ftp_dirs wku$user:[hunter],-
wku$user:[hunter.mail]
|
If MADGOAT_FTP_DIRS is not defined, then the only directory access restrictions are those imposed by normal VMS file protections.
Though it is not recommended, your system manager may have defined a system-wide value for MADGOAT_FTP_DIRS. If so, you can define the logical as a space to override directory restrictions:
$ define madgoat_ftp_dirs " " |
The MADGOAT_FTP_LOG logicals controls the amount of information that is logged to the FTP_SERVER.LOG file. The equivalence value is a number representing a bitmask. Each bit represents a particular kind of information. The value should be the sum of the following:
| Value | Meaning |
|---|---|
| 0 | Do not log anything. |
| 1 | Log the results of commands. |
| 2 | Log the commands entered and the time each was executed. |
| 4 | Include all data transferred in the log file. You generally do not want this option. |
For example, the following logs all commands and their results:
$! Log commands and results $ define madgoat_ftp_log 3 |
The logical MADGOAT_FTP_QUOTE_PATHNAME is used to control the output of type-257 server replies, which are returned by PWD and MKD server commands. For example:
>PWD <257 "SYS$SYSROOT:[SYSHLP]" is current directory. |
By default, pathnames will be quoted. However, if
MADGOAT_FTP_QUOTE_PATHNAME is defined as either "F" or "N", the quotes
will be omitted from the reply. This option has been provided for
compatibility with some FTP clients that do not recognize quoted
pathnames.
2.3.4 MADGOAT_FTP_TIMEOUT
The FTP server will automatically exit if a specified amount of time elapses between commands. You can specify the timeout value by defining the MADGOAT_FTP_TIMEOUT logical. The equivalence value is the maximum number of seconds between commands; the default value is 300 seconds (5 minutes). Specifying a value of 0 causes the server to exit immediately, effectively disabled remote FTP access to your account.
$! Timeout after 60 seconds $ define madgoat_ftp_timeout 60 |
The MADGOAT_FTP_RESTRICT logical can be used to limit the functions allowed by the server. Its equivalence value is the sum of the following desired values:
| Value | Meaning |
|---|---|
| 1 | No read (RETR) |
| 2 | No write (STOR, STOU, APPE, MKD) |
| 4 | No control (SITE) |
| 8 | No delete (DELE, RMD) |
| 16 | No list (LIST, NLST, STAT param) |
| 32 | No change working directory (CWD) |
The default value is 0, which means that the server is not restricted.
$! Restrict FTP to just reading and listing files here $ define madgoat_ftp_restrict 14 |
The MADGOAT_FTP_WELCOME logical specifies the welcome text that is to be sent back to the remote client upon a successful login. For example:
$ DEFINE MADGOAT_FTP_WELCOME "Welcome back, Joe!" |
If the welcome message begins with ``@'', it is taken to be a file name whose contents are read and sent back to the remote client. For example, the following definition would cause the contents of FTP_WELCOME.TXT to be read and sent back to the remote user:
$ DEFINE MADGOAT_FTP_WELCOME "@SYS$LOGIN:FTP_WELCOME.TXT" |
The MADGOAT_FTP_INIT logical points to an FTP client initialization
procedure. This initialization file can be used to perform such
operations as turning on the bell for the client. It corresponds to the
/INITIALIZATION qualifier on the FTP command line.
Your system manager can optionally allow all users on the system to
make files available for anonymous FTP access. You can determine if
this has been enabled on your system using the following command:
If that logical is defined, it will specify a subdirectory name that
you can create to make your own files available via anonymous FTP.
For example, the output from the command above might look like this:
With that definition, you can create a subdirectory tree named [.AFTP]
under your login directory and copy files there to make them accessible
to anonymous FTP users. Files in that tree must have a protection that
allows WORLD:READ access. The following commands show a sample sequence
you could use to create and populate your anonymous FTP directory:
You can create subdirectories under that directory to organize your
files. The anonymous FTP user will have access to all the files under
that subdirectory tree.
2.4 Serving Files Via ANONYMOUS FTP
$ show logical madgoat_ftp_tilde_anondir
$ show logical madgoat_ftp_tilde_anondir
"MADGOAT_FTP_TILDE_ANONDIR" = "AFTP" (LNM$SYSTEM_TABLE)
$
$ set def sys$login: !Set default to login directory
$ create/dir [.aftp] !Create the subdirectory
$ set file/prot=w:re aftp.dir !Allow WORLD to see it
$ copy xyz.txt [.aftp]*.*;/prot=w:re !Copy file(s) in
Be sure the subdirectory only contains those files you wish to make available to anonymous users! |
The MadGoat FTP client is used to transfer files between the local system and remote systems. The communications protocol is TCP/IP.
FTP [host-name] [command]
Command Qualifiers Defaults /ACCOUNT=name /NOACCOUNT /ANONYMOUS /NOANONYMOUS /APASSWORD /NOAPASSWORD /BATCH /BATCH /CASE=value /CASE=NORMAL /CONTROL_C=action /CONTROL_C=NORMAL /ERROR=action /ERROR=ABORT /HASH /NOHASH /INITIALIZATION[=file] /INIT=F$TRNLNM("MADGOAT_FTP_INIT") /PASSWORD=name /NOPASSWORD /PORT=port-name /PORT=FTP /REPLY /REPLY /QUIET /QUIET /SEVERE=action /SEVERE=ABORT /USERNAME=name /NOUSERNAME /VERIFY /NOVERIFY /VMS_STRUCTURE_NEGOTIATION /VMS_STRUCTURE_NEGOTIATION /WARNING=action /WARNING=ABORT
The MadGoat FTP client implements the File Transfer Protocol. This protocol is based on top of the IP and TCP protocols. MadGoat FTP works with MadGoat Software's NETLIB, which allows it to work with virtually all VMS TCP/IP implementations.The File Transfer Protocol is the language spoken between the FTP utility and an FTP Server running on a remote machine. The local process is the master and the remote server is the slave.
Through a series of commands and replies, the local FTP utility tries to send or receive files and other information.
Since the File Transfer Protocol is a negotiation language, not all requests that the FTP utility asks for can always be satisfied by the remote server. Requests that are unsatisfied will be signalled as errors to the FTP utility.
host-name
Specifies the internet name of the host with which files are to be exchanged. An IP literal may be specified here in dotted-decimal form. An alias name may also be specified here. The connection information associated with the alias name can be overridden with various command qualifiers.
command
Specifies a single in-line command to be executed after the host connection has been opened. After this command executes FTP exits and returns you to DCL. All qualifiers that pertain to the connection, such as /USER or /PASSWORD, must precede the command. If any part of the command needs to be in lowercase, enclose the command in double quotes.
When an in-line command is specified and /QUIET is specified, FTP will attempt to be totally silent in operation.
Note
If you specify an alias name which includes a command to be executed once the connection completes, the alias command will be executed before this command.
/ACCOUNT=name
Requests login to a specific user account. This may only be used if a host-name and username are specified. Most FTP servers do not use accounts.
/ANONYMOUS
/NOANONYMOUS (D)
Requests an anonymous login. FTP will attempt to log you into user anonymous, with a default password of your_username@your_host. This is intended as a shortcut for anonymous FTP users.
/APASSWORD=password
/NOAPASSWORD (D)
Specifies that the anonymous password (your_username@your_host) should be sent. Specify /ANONYMOUS/NOAPASSWORD if you want to login anonymously and still be prompted for a password.
/BATCH (D)
/NOBATCH
Requests batch mode. In batch mode, you are not prompted if you wish to retry a file transfer. The default is /BATCH.
/CASE=case
Determines case folding of all commands entered at the FTP prompt. Valid values for case are:
Value Meaning NORMAL Maintains the specified case of all parameters. This is the default action. LOWER Converts all commands and parameters to lowercase. UPPER Converts all commands and parameters to uppercase. /CONTROL_C=action
Specifies the action to take when the user types [CTRL-C]. Valid values for action are:
Value Meaning ABORT Returns to FTP> prompt. This is the default action. CONTINUE The FTP utility ignores the event. EXIT The FTP utility exits. /ERROR=action
Specifies the action to take when an error occurs. Valid values for action are:
Value Meaning ABORT The FTP utility stops what it is doing and returns to the FTP> prompt. CONTINUE The FTP utility ignores the event. EXIT The FTP utility exits. /HASH
/NOHASH (D)
Sets (or clears) HASH for the FTP utility. If HASH is set, a hash character (#) is displayed for each 1024 bytes of data shipped between the local host and remote host.
The default is /NOHASH.
/INITIALIZATION[=file] (D)
/NOINITIALIZATION
Specifies an initialization file that is to be executed before the FTP prompt appears. By default, FTP checks for the logical MADGOAT_FTP_INIT. If the logical is defined as a file, the contents of that file are automatically executed as FTP commands. There is no default file type for the FTP initialization file. You can specify /NOINITIALIZATION to prevent the execution of the file.
The initialization commands are executed after login if the /USER qualifier is supplied, but before any in-line commands. If /USER is not given, then the commands are executed before the FTP> prompt appears.
/PASSWORD=string
Specifies the password for the requested user account. This may only be used if a host-name and username are specified. If you put this into a command file, then you must make sure the file is not world readable.
/PORT=port-number
port-name
FTP (D)
Useful mainly as a debugging tool. Ordinary mortals should never use this switch. Normally the FTP port is number 21.
/QUIET
/NOQUIET (D)
Depending on the system default, the results of each transfer will be shown in full. This can be very irritating to some people. To avoid this, use /QUIET to turn them off.
/REPLY (D)
/NOREPLY
Depending on the system default, replies from the remote system will be displayed in full. This can be very irritating to some people. To avoid this, use /NOREPLY to turn them off.
/SEVERE=action
Specifies what what action to take when a severe error occurs. Valid values for action are:
Value Meaning ABORT The FTP utility stops what it is doing and returns to the FTP> prompt. CONTINUE The FTP utility ignores the event. EXIT The FTP utility exits. /USERNAME=name
Requests login to a specific username. Valid only if a remote host-name is specified.
/VERIFY
/NOVERIFY (D)
Causes commands read from a command file to be echoed. By default, any such commands are not shown.
/VMS_STRUCTURE_NEGOTIATION (D)
/NOVMS_STRUCTURE_NEGOTIATION
Specifies whether FTP should automatically negotiate with the remote FTP server to determine if it supports the VMS structure (STRU O VMS). If the remote server does support STRU VMS, then FTP will automatically use STRU VMS for all file transfers, maintaining VMS file characteristics for each file.
Usually the default is adequate, however some remote servers may "gag" on this negotiation. If this happens, you can turn the negotiation off.
/WARNING=action
Specifies what action to take when a FTP receives a warning. Valid values for action are:
Value Meaning ABORT The FTP utility stops what it is doing and returns to the FTP> prompt. CONTINUE The FTP utility ignores the event. EXIT The FTP utility exits.
To invoke the FTP utility from the CLI prompt, type FTP followed by a host name. Several examples of host names are FTP.SPC.EDU, OAK.OAKLAND.EDU, and WUARCHIVE.WUSTL.EDU.
For example, to retrieve the latest version of the MadGoat FTP client and server, you could use FTP to login anonymously to ftp.spc.edu and get the current FTP.ZIP file.
$ FTP/ANONYMOUS FTP.SPC.EDU MadGoat FTP client V2.6-1 for OpenVMS ALPHA (16-MAR-2000) Attempting to connect to host ftp.spc.edu <220 spcvxa.spc.edu MultiNet FTP Server Process 3.2(14) at Mon 25-Oct-93 5:22PM-EDT <331 ANONYMOUS user ok. Send real ident as password. <230-Guest User SYSTEM@ALPHA.WKU.EDU logged into USER7:[ANONYMOUS] at Mon 25-Oct-93 17:23, job 2021e662. <230 Directory and access restrictions apply FTP:ftp.spc.edu> cd macro32.savesets <250 Connected to USER7:[ANONYMOUS.MACRO32.SAVESETS]. FTP:ftp.spc.edu> get mgftp.zip [...]
Sends an account string to the remote server. ACCOUNT is a synonym for the SET ACCOUNT command. See HELP SET ACCOUNT for more information.
ACCOUNT new-account
Add an alias to the FTP alias database. See HELP ALIAS ADD for more information.
Show or modify the FTP alias database.
ALIAS option
These are the ALIAS command options:
Option Function ADD Add an alias to the database. DELETE Remove an alias from the database. LIST Display one or more aliases in the database. MODIFY Update an alias in the database. REMOVE Remove an alias from the database. SHOW Display one or more aliases in the database.
The FTP alias database consists of alias records that associate an alias name with connection information. The following connection information may be associated with an alias name:
Info Description Host name The system to which a connection should be opened when the alias name is specified in a SET HOST command. (Required) Username The username to provide once the connection to the remote host has completed. (Optional) Password The password to send when logging in to the remote host. Password information may only be specified if a username is also specified. (Optional) Account The account on the remote system to which resource usage should be charged. Account information may only be specified if a username is also specified. (Optional) Description A descriptive string used to document the purpose of the alias. (Optional) Command A command to be executed once the connection has completed. If a username is specified, the command will be executed after the login completes. (Optional) When opening the FTP alias database, FTP looks for a file called FTP_ALIAS_DATABASE. By default, it expects the file to be in SYS$LOGIN: and to have a type of .DAT. These defaults can be overridden by defining FTP_ALIAS_DATABASE as a logical name.
Add an alias to the FTP alias database.
ALIAS ADD alias host-name
Command Qualifiers Defaults /ACCOUNT=account-name /ANONYMOUS /APASSWORD /COMMAND=command /DESCRIPTION=description /LOG /LOG /PASSWORD[=password] /USERNAME=username
alias
The name of the alias to be added. Alias names can consist of up to 31 alphanumeric (A-Z, 0-9), dollar sign ($), underscore (_), and dash (-) characters. Alias names are case-insensitive, since they are automatically converted to uppercase.host-name
The name (or IP number) of the system to which FTP should connect when the alias name is specified.
/ACCOUNT=account-name
Specifies the account on the remote system to which resource usage will be charged. Most servers do not require an account name. An account name cannot be specified if a username is not specified.
/ANONYMOUS
Specifies that the remote login should be as an anonymous user. The default password for an anonymous login is local_user@local_host.
/APASSWORD
NOAPASSWORD
Specifies that the anonymous password (local_user@local_host) should be used when logging in to the remote system. Specifying /NOAPASSWORD will override sending the anonymous password if /ANONYMOUS is also specified.
/COMMAND=command
Specifies a command to be executed once FTP has connected to the remote host. If /USERNAME or /ANONYMOUS are specified, then the command will be executed once the login has completed.
/DESCRIPTION=description
Specifies descriptive title to be associated with the alias. The description is displayed during an ALIAS LIST/FULL
/LOG (D)
/NOLOG
Controls whether an information message is displayed once the alias is added to the database.
/PASSWORD[=password]
Specifies the password to use when logging in to the remote system. If /PASSWORD is specified without a value, then FTP will prompt for the password. A password cannot be specified without a username.
Note
The method of encryption for passwords stored in the alias database is not very secure, so storing password information is not recommended./USERNAME=username
Specifies the remote username with which to login to the remote system.
| #1 |
|---|
FTP> alias add spc ftp.spc.edu/anon
FTP alias database SYS$SYSDEVICE:[SIMMONS]FTP_ALIAS_DATABASE.DAT; not found.
Do you want to create a new alias database ? [Y]: [Return]
%FTP-I-DBCREATED, Created FTP alias database SYS$SYSDEVICE:[SIMMONS]FTP_ALIAS_DATABASE.DAT;1
%FTP-I-ALIASADD, Alias SPC added
|
This example demonstrates what happens when you try to add an alias to a non-existent alias database.
| #2 |
|---|
FTP> alias add wkuserv ftp.wku.edu/anon/command="cd vms/filserv"-
_FTP> /desc="WKU Fileserv directory"
%FTP-I-ALIASADD, Alias WKUSERV added
FTP> open wkuserv
%FTP-I-ALIASTRANS, Alias WKUSERV translated to host name ftp.wku.edu
%FTP-I-ATTEMPTING, Attempting to connect to host ftp.wku.edu
<220 wkuvx2.wku.edu MadGoat FTP server V2.0-3 for OpenVMS VAX (8-JUN-1994) ready.
%FTP-I-LOGIN, Attempting to login to user anonymous
<331 Guest login Okay, send ident or e-mail address as password.
<230-==========================================================================
<230-
<230- Welcome to the FTP archives of Western Kentucky University.
<230-
<230- The MadGoat Software and WKU FILESERV archives are available.
<230-
<230- This is a VMS system; the subdirectories can be referenced in
<230- either VMS format or UNIX-style:
<230-
<230- CD [.VMS.FILESERV] or CD vms/fileserv or CD vms.fileserv
<230-
<230- If you have any questions or comments, please send mail to
<230- Hunter Goatley <goathunter@MadGoat.com>.
<230-
<230-==========================================================================
<230-Guest SIMMONS@kiss.com login Okay, 8-AUG-1994 11:47:59 CST, access restrictions apply.
<230 Connection closes if idle for 5 min.
<250 Current Directory WKU$INFO:[ANONYMOUS.VMS.FILESERV], completed.
FTP:ftp.wku.edu>
|
This example demonstrates how the information from an alias record is used when the alias is specified on an OPEN command.
Remove an alias from the FTP alias database.
ALIAS DELETE alias
Command Qualifiers Defaults /ACCOUNT[=account-name] /ANONYMOUS /APASSWORD /CONFIRM /CONFIRM /DESCRIPTION[=description] /HOST=host-name /LOG /LOG /USERNAME[=username]
alias
The name of the alias to be deleted. This parameter may contain wildcard characters. Alias records that match this parameter and the qualifiers specified will be selected for deletion.
/ACCOUNT[=account-name]
/NOACCOUNT
Specifies the account information that should be present in the aliases to be deleted. /ACCOUNT will match any alias record with an account. /NOACCOUNT will match any alias record with no account. Wildcard characters are allowed in the account names specified.
/ANONYMOUS
/NOANONYMOUS
/ANONYMOUS will match any alias record that specifies an anonymous login. /NOANONYMOUS will match any other alias record.
/APASSWORD
NOAPASSWORD
/APASSWORD will match any alias record for which the anonymous password is being sent. /NOAPASSWORD will match any other alias record.
/CONFIRM (D)
/NOCONFIRM
Specifies whether FTP should prompt the user before deleting alias records.
/DESCRIPTION[=description]
/NODESCRIPTION
Specifies description information on the aliases to be deleted. /DESCRIPTION will match any alias record that has a description. /NODESCRIPTION will match any alias record without a description. Wildcard characters are allowed in the descriptions specified.
/HOST=host-name
Specifies a wildcarded host name used to match alias records.
/LOG (D)
/NOLOG
Controls whether an informational message is displayed for each alias deleted.
/USERNAME[=username]
/NOUSERNAME
Specifies the username information for the aliases to be deleted. /USERNAME will match any alias record for which a particular username was specified. /NOUSERNAME will match any other alias record. Wildcard characters are allowed in the usernames specified.
| #1 |
|---|
FTP> alias delete *
Delete alias SAMPLE (Sample alias definition) ? [N]: y
%FTP-I-ALIASREM, Alias SAMPLE removed
Delete alias SPC ? [N]: [Return]
Delete alias TEST ? [N]: [Return]
Delete alias WKUSERV (WKU Fileserv directory) ? [N]: [Ctrl-Z]
|
In this example, all alias records are selected for deletion. Confirmation prompts are given for each alias since /CONFIRM is present by default. Confirmation prompting continues until FTP is either out of aliases to delete or [Ctrl-Z] is pressed.
| #2 |
|---|
FTP> alias delete */anon
Delete alias SPC ? [N]: [Return]
Delete alias WKUSERV (WKU Fileserv directory) ? [N]: [Return]
|
In this example, the anonymous-login aliases are the candidates for deletion.
| #3 |
|---|
FTP> alias delete test/noconf
%FTP-I-ALIASREM, Alias TEST removed
|
In this example, a single alias is chosen to be deleted.
Display information about aliases in the database.
ALIAS LIST [alias]
Command Qualifiers Defaults /ACCOUNT[=account-name] /ANONYMOUS /APASSWORD /BRIEF /BRIEF /DESCRIPTION[=description] /FULL /HOST=host-name /USERNAME[=username]
alias
The name of the alias to be displayed. This parameter may contain wildcard characters. If this parameter is omitted, then an alias name of * will be used.
/ACCOUNT[=account-name]
/NOACCOUNT
Specifies the account information that should be present in the aliases to be displayed. /ACCOUNT will match any alias record with an account. /NOACCOUNT will match any alias record with no account. Wildcard characters are allowed in the account names specified.
/ANONYMOUS
/NOANONYMOUS
/ANONYMOUS will match any alias record that specifies an anonymous login. /NOANONYMOUS will match any other alias record.
/APASSWORD
NOAPASSWORD
/APASSWORD will match any alias record for which the anonymous password is being sent. /NOAPASSWORD will match any other alias record.
/BRIEF (D)
Specifies that the one-line form of output should be used. /BRIEF output includes the alias name, the host name, and the username (if one was specified).
/DESCRIPTION[=description]
/NODESCRIPTION
Specifies description information on the aliases to be displayed. /DESCRIPTION will match any alias record that has a description. /NODESCRIPTION will match any alias record without a description. Wildcard characters are allowed in the descriptions specified.
/FULL
Specifies that the maximum amount of information should be displayed for each alias selected.
/HOST=host-name
Specifies a wildcarded host name used to match alias records.
/USERNAME[=username]
/NOUSERNAME
Specifies the username information for the aliases to be displayed. /USERNAME will match any alias record for which a particular username was specified. /NOUSERNAME will match any other alias record. Wildcard characters are allowed in the usernames specified.
| #1 |
|---|
FTP> alias list
%FTP-E-DBOPENERR, Error opening FTP alias database SYS$SYSDEVICE:[SIMMONS]FTP_ALIAS_DATABASE.DAT;
-RMS-E-FNF, file not found
|
In this example, the alias database does not exist. You can create a new alias database by adding an alias definition (ALIAS ADD).
| #2 |
|---|
FTP> alias list
Alias Host Username
----- ---- --------
SAMPLE sample (none)
SPC ftp.spc.edu anonymous
TEST 127.0.0.1 ftptest
WKUSERV ftp.wku.edu anonymous
|
This example demonstrates a /BRIEF listing of all of the aliases in the database.
| #3 |
|---|
FTP> alias list wkuserv/full
Alias: WKUSERV
Description: WKU Fileserv directory
Host: ftp.wku.edu
Username: anonymous
Password: SIMMONS@kiss.com
Command: cd vms/fileserv
|
This example shows a /FULL listing of an alias. The amount of information displayed for an alias will vary depending upon the amount of information in the alias record. For example, initial-command information is not displayed if an initial command was not provided.
Modify an alias in the FTP alias database.
ALIAS MODIFY alias
Command Qualifiers Defaults /ACCOUNT=account-name /ANONYMOUS /APASSWORD /COMMAND=command /DESCRIPTION=description /HOST=host-name /LOG /LOG /PASSWORD[=password] /USERNAME=username
alias
The name of the alias to be modified. Alias names can consist of up to 31 alphanumeric (A-Z, 0-9), dollar sign ($), underscore (_), and dash (-) characters. Alias names are case-insensitive, since they are automatically converted to uppercase.
/ACCOUNT=account-name
/NOACCOUNT
Specifies the account on the remote system to which resource usage will be charged. Most servers do not require an account name. An account name cannot be specified without a username.
/ANONYMOUS
/NOANONYMOUS
Specifies that the remote login should be as an anonymous user. The default password for an anonymous login is local_user@local_host. This qualifier overrides the password and account information for the alias.
/APASSWORD
NOAPASSWORD
Specifies that the anonymous password (local_user@local_host) should be used when logging in to the remote system. Specifying /NOAPASSWORD will disable sending the anonymous password.
/COMMAND=command
/NOCOMMAND
Specifies a command to be executed once FTP has connected to the remote host. If the alias record contains a username, then the command will be executed once the login has completed.
/DESCRIPTION=description
/NODESCRIPTION
Specifies descriptive title to be associated with the alias. The description is displayed during an ALIAS LIST/FULL
/LOG (D)
/NOLOG
Controls whether an informational message is displayed once the alias has been modified
/PASSWORD[=password]
/NOPASSWORD
Specifies the password to use when logging in to the remote system. If /PASSWORD is specified without a value, then FTP will prompt for the password. A password cannot be specified without a username.
Note
The method of encryption for passwords stored in the alias database is not very secure, so storing password information is not recommended./USERNAME=username
/NOUSERNAME
Specifies the remote username with which to login to the remote system. This qualifier overrides the password and account information for the alias.
| #1 |
|---|
FTP> alias modify test/user=stanley
%FTP-I-ALIASMOD, Alias TEST modified
-FTP-W-PWDACCTDIS, Password and/or account information disabled
|
In this example, a new username is specified, so the old password and account information is invalidated.
| #2 |
|---|
FTP> alias modify test.test
%FTP-E-INVALSYN, Invalid alias syntax
|
In this example, the alias name provided contains an invalid character, a period (.).
Remove an alias from the FTP alias database. See HELP ALIAS DELETE for more information.
Display information about aliases in the database. See HELP ALIAS LIST for more information.
Appends the specified local file to a remote file if the remote file exists, or creates it if there is no such remote file.
APPEND local-file-list remote-file
Command Qualifiers Defaults /BACKUP /NOBACKUP /BEFORE[=time] None. /CONFIRM /NOCONFIRM /CREATED /NOCREATED /EXPIRED /NOEXPIRED /HASH /NOHASH /LOG /NOLOG /MODE=mode /MODE=STREAM /MODIFIED /NOMODIFIED /SINCE[=time] None. /STRUCTURE=structure /STRUCTURE=DEFAULT /UNIQUE /NOUNIQUE /TYPE=type[:format] /TYPE=ASCII:NON_PRINT /WILD /WILD
local-file-list
Specifies one or more local files that are to be appended to the file on the remote host. If multiple file names are given, they must be separated by commas.Wildcard characters can be specified in the local-file-list.
remote-file
Specifies the file on the remote file system to which the local file should be appended. If no remote file is specified, a remote file with the same name as the local file will be created. If the remote file is given but doesn't exist, it will be created.
If the remote-file is specified, the local-file is appended to it if it exists, or created if it doesn't. If no remote file is specified, the same name as the local file is used as the remote-file spec.
While the transfer is proceeding you may check the state of the transfer with either [CTRL-T] or [CTRL-A]. While a file is being transferred you will be told the file name, and the number of bytes already transferred.
WARNING: If you try to transfer a large number of files at once you may get the following error message: Connection closed; transfer Aborted
This is caused by a limit on the number of allowed connections.
/BACKUP
/NOBACKUP (D)
Selects files using the backup date. Valid only when used in conjunction with /SINCE and /BEFORE.
/BEFORE[=time]
Transfers only those files dated prior to the specified time. You can specify time as an absolute time, as a combination of absolute and delta times, or as one of the following keywords: TODAY (default), TOMORROW, or YESTERDAY. Specify one of the following qualifiers with the /BEFORE qualifier to indicate the time attribute to be used as the basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL-Z] Quits the transfer By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/CREATED (D)
/NOCREATED
Selects files using the creation date. Valid only when used in conjunction with /SINCE and /BEFORE. This is the default date used for file selection by date.
/EXPIRED
/NOEXPIRED (D)
Selects files using the expiration date. Valid only when used in conjunction with /SINCE and /BEFORE.
/HASH
/NOHASH (D)
Temporarily enable or disable the HASH (HASH or NOHASH).
When Hash is enabled and a file is transferred from one machine to another, a hash mark is displayed for each 1024 characters of data that is transferred.
By default, no hash marks are displayed as the data is being transferred. You can change this with the FTP command SET HASH.
Note that [CTRL-A] and [CTRL-T] can be used to display a line indicating the state of the transfer.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/MODE=mode
Attempts to negotiate a different data transfer mode. The following options may be specified:
- BLOCK
- STREAM (default)
- COMPRESSED
For more information on the modes, see HELP SET MODE.
/MODIFIED
/NOMODIFIED (D)
Selects files using the modified (revised) date. Valid only when used in conjunction with /SINCE and /BEFORE.
/SINCE[=time]
Transfers only those files dated after the specified time. You can specify time as an absolute time, as a combination of absolute and delta times, or as one of the following keywords: TODAY (default), TOMORROW, or YESTERDAY. Specify one of the following qualifiers with the /SINCE qualifier to indicate the time attribute to be used as the basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.
/STRUCTURE=structure
Attempts to negotiate a different file structure before the file contents are transferred.The following options may be specified:
- FILE (default)
- PAGE
- VMS (automatically negotiated)
The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system.
/TYPE=type[:format]
Attempts to negotiate a new data type before the file data is transferred. The following options may be specified:
- ASCII (default)
- IMAGE
- EBCDIC (not implemented)
There are 3 different ASCII formats: NON_PRINT, CONTROL, and TELNET. If the data type is ASCII:NON_PRINT or ASCII:TELNET, the file is stored on VMS as a sequential file with variable-length record format and carriage-return carriage control for record attribute. If the type is ASCII:CONTROL, it is stored with Fortran carriage control.
If the data type is IMAGE the file is stored on VMS as a sequential file with fixed-length 512-byte records and no record attributes. The /BLOCKSIZE qualifier may be specified to override default blocksize of 512 bytes.
| #1 |
|---|
FTP:domino.madgoat.com> append login.com x.x
<200 Stru F Okay.
<200 Port 161,6,5,3,10,213 Okay.
<150 ASCII Append of X.X;1 Started; Opening data connection.
<226 File transfer Okay; Closing data connection.
417 bytes (1 block) in 00:00:00.27 = 1544 cps, IO=1
Appended file SYS$SYSDEVICE:[SIMMONS]LOGIN.COM;1 to (Remote) x.x
<200 Stru O VMS Okay.
FTP:domino.madgoat.com>
|
In this example, the local file LOGIN.COM, is appended to a file on a VMS system called X.X.;1.
Sets the default file type to ASCII. The ASCII command is a synonym for SET TYPE ASCII. See HELP SET TYPE for more information.
ASCII
Transfers control from the current process to the specified process.
ATTACH [process-name]
process-name
Specifies the process name for the process to which control is to be transferred.
Note
This parameter is not affected by the current case-conversion setting (see SET CASE). DCL case-conversion rules are used.
The ATTACH command is used in conjunction with the SPAWN command to transfer control from one process to another.
While in FTP, you can SPAWN a subprocess and use the DCL command ATTACH to transfer control back to the process running FTP. You can then use ATTACH to reconnect to the spawned subprocess.
/IDENTIFICATION=pid
Specifies the process identification (PID) for the process to which control should be transferred.
/PARENT
Transfers control to the parent process of the process running MGFTP.
Sets the default file type to IMAGE. The BINARY command is a synonym for SET TYPE IMAGE. See HELP SET TYPE for more information.
BINARY
Reinitializes the connection to the remote host, logging you out if you are logged in. BYE is a synonym for LOGOUT. See HELP LOGOUT for more information.
BYE
Change the remote default path or current directory. CD is a synonym for SET DEFAULT.
CD directory
Change the protection on a remote file.
CHMOD permission remote-file-list
permission
A 4-digit hexadecimal number that specifies the file permissions. Each hexadecimal digit represents the following (SUGO):
S Special bits U User or owner of file G Group member O Other or the world The values of each digit (UGO) are:
1 Execute privilege 2 Write privilege 4 Read privilege 8 Delete privilege (VMS systems only) The values for the leading digit (the ``S'' digit) for UNIX systems are:
1 Set link permission 2 Set group ID on execution 4 Set User or owner ID on execution For example, the following command grants the owner all access, grants the group execute and read privileges, and grants others (world) no access:
FTP:ftp.wku.edu> CHMOD 750 file-nameremote-file-list
Specifies a file specification pattern to be interpreted at the remote site. This can be a list of comma-separated file specifications. Each file name can contain ``wild'' characters such as ``*''. The definition of the wild character is determined by the remote host conventions:
- VMS uses ``*'' for any string and ``%'' for any character.
- UNIX uses ``*'' for any string and ``?'' for any character.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL/Z] Quits the transfer /LOG (D)
/NOLOG
Temporarily enable the QUIET setting.
When Log is turned on, you are notified after each file has been modified.
The default is to not notify for confirmation. This default can be changed with the FTP command SET [NO]QUIET.
/WILD (D)
/NOWILD
Determines whether or not wildcards are expanded by asking the remote host for a list of possible file names.
Closes the current connection to the remote host. However, the FTP utility does not EXIT.The DISCONNECT command is a synonym for CLOSE.
CLOSE
| #1 |
|---|
$ ftp fake-unix
MadGoat FTP client V2.6-1 for OpenVMS VAX (1-OCT-1993)
Attempting to connect to host fake-unix
<220 fake-unix.bogus.com FTP server (ULTRIX Version 4.1 Tue Mar 19 00:38:17 EST 1991) ready.
FTP:fake-unix> close
<221 Goodbye.
Transfer Okay; Connection Closing
FTP> connect fake
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> show host
Connection open to fake.bogus.com
FTP:fake>
|
In the example above, a connection is established to node fake-unix. The CLOSE command is then used to disconnect from fake-unix and a new connection is made to fake.
Opens a connection to a remote system. CONNECT is a synonym for SET HOST. See HELP SET HOST for more information.
Change the remote default path or current directory. CD, CWD, and CPATH are all synonyms for SET REMOTE_DEFAULT_DIRECTORY.
CPATH directory
directory
Specifies the remote file system directory to which future command should be directed.
This command behaves exactly the same as the FTP command
SET REMOTE directory
For more information, hints and examples please see the documentation on the FTP command SET REMOTE.
Create a file from the terminal and create a directory.
CREATE file-name-list
CREATE/DIRECTORY remote-directory
Command Qualifiers Defaults /CONFIRM /NOCONFIRM /HASH /NOHASH /LOG /NOLOG /UNIQUE /NOUNIQUE /TYPE=type[:format] /TYPE=ASCII:NON_PRINT
file-name-list
Specifies a list of remote file names to be created. Each name is separated by a comma. Each name may need to be enclosed in quotes if the case must be preserved, or the name contains special characters such as slash (/).
The CREATE command creates a remote file; the file contents are read from the user's terminal. Simply enter the text and press [CTRL-Z] to close the file. This is repeated for each file created.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL-Z] Quits the transfer By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/HASH
/NOHASH (D)
Temporarily enable or disable the HASH (HASH or NOHASH).
When Hash is enabled and a file is transferred from one machine to another, a hash mark is displayed for each 1024 characters of data that is transferred.
By default, no hash marks are displayed as the data is being transferred. You can change this with the FTP command SET HASH.
Note that [CTRL-A] and [CTRL-T] can be used to display a line indicating the state of the transfer.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/TYPE=type[:format]
Attempts to negotiate a new data type before the file data is transferred. The following options may be specified:
- ASCII (default)
- IMAGE
- EBCDIC (not implemented)
There are 3 different ASCII formats: NON_PRINT, CONTROL, and TELNET. If the data type is ASCII:NON_PRINT or ASCII:TELNET, the file is stored on VMS as a sequential file with variable-length record format and carriage-return carriage control for record attribute. If the type is ASCII:CONTROL, it is stored with Fortran carriage control.
If the data type is IMAGE the file is stored on VMS as a sequential file with fixed-length 512-byte records and no record attributes. The /BLOCKSIZE qualifier may be specified to override default blocksize of 512 bytes.
/UNIQUE
Tells the remote host to create a new name for the file if the file already exists in the remote default directory. The name of the file is specified in the reply from the server.
Create a directory. MKDIR is a synonym for CREATE/DIRECTORY.
CREATE directory
Command Qualifiers Defaults /LOG /NOLOG
directory
Specifies the remote file system directory to be created.
This creates a remote directory. It may be removed by the command DELETE/DIRECTORY.
Change the remote default path or current directory. CD, CWD, and CPATH are all synonyms for SET REMOTE_DEFAULT_DIRECTORY.
CWD directory
directory
Specifies the remote file system directory to which future command should be directed.
This command behaves exactly the same as the FTP command
SET REMOTE directory
For more information, hints and examples please see the documentation on the FTP command SET REMOTE.
Associates an equivalence string and a set of attributes with a key on the terminal keyboard.
DEFINE/KEY key-name equivalence-string
Command Qualifiers Defaults /IF_STATE=state-name /SET_STATE=state-name /TERMINATE /TERMINATE /ECHO /ECHO /LOCK /NOLOCK
key-name
Specifies the name of the key that you are defining.The following table lists the key names in column one. The remaining three columns indicate the key designations on the keyboards of the three different types of terminals that allow key definitions.
Key Name LK201 VT100 VT52 PF1 PF1 PF1 [blue] PF2 PF2 PF2 [red] PF3 PF3 PF3 [gray] PF4 PF4 PF4 - - KP0, KP1, ..., KP9 0, 1, ..., 9 0, 1, ..., 9 0, 1, ..., 9 Period . . . Comma , , n/a Minus - - n/a Enter Enter ENTER ENTER Left < - < - < - Right - > - > - > Find (E1) Find - - Insert Here (E2) Insert Here - - Remove (E3) Remove - - Select (E4) Select - - Prev Screen (E5) Prev Screen - - Next Screen (E6) Next Screen - - Help Help - - Do Do - - F6, F7, ... F6, F7, ... - - F20 F20 - - equivalence-string
Specifies the command string to be processed when you press the key. Enclose the string in quotation marks (" ") to preserve spaces and lowercase characters.
This command behaves like the DCL command DEFINE/KEY. For more information, hints, and examples please see the DCL documentation for DEFINE/KEY.
/ECHO (D)
/NOECHO
Specifies whether or not the command equivalence string is displayed when the key is pressed.
/IF_STATE=state
Specifies that the key definition is active only during the specified key state. See /SET_STATE for more information.
/LOCK
/NOLOCK (D)
Specifies whether or not the key state specified by /SET_STATE remains in effect after the next key press. By default, a key state change from a key defined with /SET_STATE is in effect only until the next key is pressed. By using /LOCK, you can change the key state until a new state is established using a key defined /LOCK.
/SET_STATE=state
Specifies the key state that is to take effect for the next key is pressed.
/TERMINATE (D)
/NOTERMINATE
Specifies whether or not the command is immediately executed when the key is pressed.
| #1 |
|---|
FTP> define/key pf1 "OPEN FTP.WKU.EDU/ANONYMOUS"
|
In this example, key PF1 is defined so that the OPEN command will be executed when PF1 is pressed.
| #2 |
|---|
FTP> define/key pf1 "open/anonymous "/noterminate/set_state=ANON
FTP> define/key kp1 "ftp.wku.edu"/term/if_state=anon
FTP> define/key kp2 "ftp.spc.edu"/term/if_state=anon
FTP> define/key kp3 "wku.edu"/term/if_state=anon
FTP>
|
In the example above, PF1 is defined to work like a ``gold'' key in EVE or EDT. When PF1 is pressed, the command ``OPEN '' is input and the key state is temporarily changed to ``ANON''. When KP1, KP2, or KP3 are pressed, the corresponding host name is supplied and the ``OPEN'' command is executed.
Deletes a file on the remote system or a key definition.
DELETE remote-file-list
Command Qualifiers Defaults /CONFIRM /NOCONFIRM /DIRECTORY /NODIRECTORY /KEY /LOG /NOLOG /WILD /WILD
remote-file-list
The name of the remote file to be deleted. If a list is given, file names are separated by commas. Each file name can contain ``wild'' characters such as ``*''. The definition of the wild character is determined by the remote host conventions:
- VMS uses ``*'' for any string and ``%'' for any character.
- UNIX uses ``*'' for any string and ``?'' for any character.
Note
If the file name contains a wild character, you must use either /CONFIRM or /NOWILD to delete it.For remote VMS servers, it is possible to delete all files from a whole directory tree by specifying [...]*.*;* as the remote file name.
You may also delete just specific files from a VMS host by specifying, [...]file.type;*
For remote UNIX servers, it is possible to delete all files from a whole directory tree by specifying ``-FR'' as the remote file name.
This command causes the file(s) specified to be deleted at the server. If the file does not exist or is unable to be deleted (because file protection or record locking), an appropriate error message will be returned.To delete a file, FTP first gets a list of matching files from the remote server, and then deletes each of the files in the list. In this way, it is possible to specify wildcards such as ``*''.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is deleted. The following responses may be given:
Yes Deletes the file No Does not delete and prompts for next deletion All Deletes the file and all subsequent files Quit Quits the delete [CTRL-Z] Quits the delete By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/DIRECTORY
/NODIRECTORY (D)
Delete a remote directory, instead of a file.
/KEY
Deletes a key definition created with DEFINE/KEY. The special qualifier /STATE=statename can be used to specify the key state from which the key definition should be deleted.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/WILD (D)
/NOWILD
Determines whether or not wildcards are expanded by asking the remote host for a list of possible file names.
If the remote file specification includes ``/'', it will be necessary to enclose the entire remote file specification in quotes. The use of quotes prevents the FTP command interpreter from treating the ``/'' as the beginning of a command qualifier.
FTP:unix> delete /usr/goat/delete.me %CLI-W-NOQUAL, qualifiers not allowed - supply only verb and parameters \USR\ FTP:unix> delete "/usr/goat/delete.me" <250 File /usr/goat/delete.me deleted. FTP:unix>
| #1 |
|---|
FTP:fake.bogus.com> del x.x;
Obtaining name list for "x.x;" from remote host
<200 Stru F Okay.
<200 Port 161,6,5,3,10,215 Okay.
<150 NLST of X.X; Started; Opening data connection.
<226 File transfer Okay; Closing data connection.
<200 Stru O VMS Okay.
<250 Delete file SYS$SYSDEVICE:[SIMMONS]X.X;1, completed.
Deleted file X.X;1
FTP:fake.bogus.com>
|
In this example, the file X.X is deleted from a remote VMS system.
| #2 |
|---|
FTP:unix> delete /usr/goat/delete.me
%CLI-W-NOQUAL, qualifiers not allowed - supply only verb and parameters
\USR\
FTP:unix> delete "/usr/goat/delete.me"
<250 File /usr/goat/delete.me deleted.
FTP:unix>
|
If the remote file specification includes ``/'', it will be necessary to enclose the entire remote file specification in double quotes, because the FTP command interpreter interprets ``/'' as the beginning of a qualifier.
Requests a directory listing from the remote host. LS is a synonym for this command.
DIRECTORY remote-file-list
Command Qualifiers Defaults /BRIEF None. /FULL /FULL /OUTPUT=local-file /OUTPUT=SYS$OUTPUT
remote-file-list
Specifies a file specification pattern to be interpreted at the remote site. This can be a list of comma-separated file specifications. Each file name can contain ``wild'' characters such as ``*''. The definition of the wild character is determined by the remote host conventions:
- VMS uses ``*'' for any string and ``%'' for any character.
- UNIX uses ``*'' for any string and ``?'' for any character.
FTP passes the remote-file-list to the remote FTP server, which interprets it and returns a list of files that match it.
/BRIEF
Causes only the file names to be displayed.
/FULL
The file name and extra information about the file will be returned. This is the default format. Extra file information can be displayed using the SHOW FILE command.
The MadGoat FTP server returns the file name, size, creation date, owner, and protection for a /FULL listing, while SHOW FILE returns even more information.
/OUTPUT=local-file
Sends the output to a specified local file. The default is SYS$OUTPUT:.
If the remote file specification includes ``/'', it will be necessary to enclose the entire remote file specification in quotes. The use of quotes prevents the FTP command interpreter from treating the ``/'' as the beginning of a command qualifier.
| #1 |
|---|
FTP:ftp.wku.edu> cd [simmons.mmk.source]
<250 Current Directory SYS$SYSDEVICE:[SIMMONS.MMK.SOURCE], completed.
FTP:ftp.wku.edu> dir *.cld
<200 Stru F Okay.
<200 Port 161,6,5,3,68,167 Okay.
<150 LIST of *.CLD Started; Opening data connection.
SYS$SYSDEVICE:[SIMMONS.MMK.SOURCE]
MMK_CLD.CLD;1 3 17-OCT-1993 13:08 [SIMMONS] (RWED,RWED,,)
MMK_COMPILE_RULES_CLD.CLD;1
2 16-SEP-1993 16:35 [SIMMONS] (RWED,RWED,,)
Total of 2 Files, 5 Blocks.
<226 File transfer Okay; Closing data connection.
245 bytes (1 block) in 00:00:01.13 = 217 cps, IO=1
<200 Stru O VMS Okay.
FTP:ftp.wku.edu> dir/brief *.cld
<200 Stru F Okay.
<200 Port 161,6,5,3,68,168 Okay.
<150 NLST of *.CLD Started; Opening data connection.
mmk_cld.cld
mmk_compile_rules_cld.cld
<226 File transfer Okay; Closing data connection.
40 bytes (1 block) in 00:00:00.33 = 121 cps, IO=1
<200 Stru O VMS Okay.
FTP:ftp.wku.edu>
|
This example shows the output from a default DIRECTORY command and from a DIRECTORY/BRIEF command.
Closes the current connection to the remote host. The FTP utility does not exit.DISCONNECT is a synonym for CLOSE. For more information, see HELP CLOSE.
DISCONNECT
Deletes a file on the remote system.ERASE is a synonym for DELETE. For more information, see HELP DELETE.
ERASE remote-file-list
Close the connection to the remote host and exit the FTP utility.
EXIT
EXIT is the normal command for leaving the FTP utility.
Note
EXIT within a command file will exit the FTP utility entirely, not just that nesting level.
| #1 |
|---|
FTP:ftp.wku.edu> EXIT
<221 Service closing control connection.
Transfer Okay; Connection Closing
$
|
In the example, the EXIT command is used to exit the FTP utility.
Retrieves a specified file from the remote server.
GET remote-file-list [local-file]
Command Qualifiers Defaults /APPEND /NOAPPEND /BLOCKSIZE=n /BLOCKSIZE=512 /CONFIRM /NOCONFIRM /HASH /NOHASH /LOG /NOLOG /MODE=mode /MODE=STREAM /PROMPT /NOPROMPT /RECURSIVE /NORECURSIVE /RETAIN /NORETAIN /STRUCTURE=structure /STRUCTURE=DEFAULT /TYPE=type[:format] /TYPE=ASCII:NON_PRINT /WILD /NOWILD
remote-file-list
Specifies a file specification pattern to be interpreted at the remote site. This can be a list of comma-separated file specifications. Each file name can contain ``wild'' characters such as ``*''. The definition of the wild character is determined by the remote host conventions:
- VMS uses ``*'' for any string and ``%'' for any character.
- UNIX uses ``*'' for any string and ``?'' for any character.
[local-file]
Specifies the name the transferred file is to have on the local system. Any missing fields in the local file name are filled in from the the remote file name. The local-file can consist of only a device and directory, if desired.
The files specified in the remote-file-list will be transferred to the local default directory. If local-file is present, that name will be used; otherwise the local name will be as close as possible to the remote name.The FTP utility will attempt to negotiate the appropriate file transfer parameters (Mode, Structure and Type). Once the appropriate file transfer parameters have been negotiated, the file contents are sent.
Specifying /WILD causes GET to work the same way MGET works.
While the transfer is in-progress, the state of the transfer can be checked by pressing either [CTRL-T] or [CTRL-A]. While a file is being transferred, FTP displays the file name, the number of bytes already transferred, the percentage of the total size transferred, and the current transfer rate.
/APPEND
/NOAPPEND (D)
Appends the remote-file(s) to the specified local-file.
/BLOCKSIZE=n
When transferring a file with /TYPE=IMAGE and /STRUCTURE=FILE, FTP will receive the binary file using the blocksize that you specify. The default is 512 bytes, which is suitable for most VMS binary files, including executable images (fixed-length 512-byte records). A different blocksize would be appropriate when transferring VMS BACKUP savesets, for example.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL-Z] Quits the transfer By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/HASH
/NOHASH (D)
Temporarily enable or disable the HASH (HASH or NOHASH).
When Hash is enabled and a file is transferred from one machine to another, a hash mark is displayed for each 1024 characters of data that is transferred.
By default, no hash marks are displayed as the data is being transferred. You can change this with the FTP command SET HASH.
Note that [CTRL-A] and [CTRL-T] can be used to display a line indicating the state of the transfer.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/MODE=mode
Attempts to negotiate a different data transfer mode. The following options may be specified:
- BLOCK
- STREAM (default)
- COMPRESSED
For more information on the modes, see HELP SET MODE.
/PROMPT
/NOPROMPT (D)
Causes FTP to prompt for the local file name before transferring each file. The default action is to base the local file name on the remote file name./RECURSIVE
/NORECURSIVE (D)
If the command specifies a list of files from a series of directories and subdirectories, FTP will attempt to recreate the same directory tree structure as well as transferring the files into the same subdirectories. You may specify a directory tree with [...] to a remote VAX or with file name "-FR" to a remote UNIX (BSD) host.Currently, /RECURSIVE only works for UNIX and VMS systems. The option PATH_PARSING must be set to ON.
This assumes that UNIX hosts put out the following for recursive operations
file file ./dir: file file ./dir/sub (This is only true for BSD systems.) or file dir/file dir/subdir/file This assumes that the VMS systems send file specs as:
file.ver or Device:[dir]file.ver /RETAIN
/NORETAIN (D)
Specifies whether or not file version numbers are to retained when files are copied from the remote system. If /RETAIN is specified, or the version number is explicitly specified, the version number is retained on the output file name./STRUCTURE=structure
Attempts to negotiate a different file structure before the file contents are transferred.The following options may be specified:
- FILE (default)
- PAGE
- VMS (automatically negotiated)
The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system.
/TYPE=type[:format]
Attempts to negotiate a new data type before the file data is transferred. The following options may be specified:
- ASCII (default)
- IMAGE
- EBCDIC (not implemented)
There are 3 different ASCII formats: NON_PRINT, CONTROL, and TELNET. If the data type is ASCII:NON_PRINT or ASCII:TELNET, the file is stored on VMS as a sequential file with variable-length record format and carriage-return carriage control for record attribute. If the type is ASCII:CONTROL, it is stored with Fortran carriage control.
If the data type is IMAGE the file is stored on VMS as a sequential file with fixed-length 512-byte records and no record attributes. The /BLOCKSIZE qualifier may be specified to override default blocksize of 512 bytes.
| #1 |
|---|
FTP:ftp.wku.edu> get login.exe tmp.tmp
<200 Port 161,6,5,3,118,148 Okay.
<150 VMS Retrieve of LOGIN.EXE;1 Started; Opening data connection.
<226 File transfer Okay; Closing data connection.
468 bytes (1 block) in 00:00:00.63 = 743 cps, IO=2
Received file login.exe to (Local) TMP.TMP;1
FTP:ftp.wku.edu>
|
In this example, the remote file LOGIN.EXE is transferred to the local system as TMP.TMP. Note that the file was transferred using the VMS structure (``VMS Retrieve''). STRU VMS was automatically negotiated between the systems when the initial connection was made.
| #2 |
|---|
FTP:unix> get /usr/goat/.login delete.me
%CLI-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement
\USR\
FTP:unix> get "/usr/goat/.login" delete.me
<200 PORT command successful.
<150 Opening data connection for /usr/goat/.login (161.6.5.4,44011) (670 bytes).
<226 Transfer complete.
Transferred 695 bytes in 00:00:00.54 = 1287 bytes/Second
FTP:unix>
|
If the remote file specification includes ``/'', it will be necessary to enclose the entire remote file specification in double quotes, because the FTP command interpreter interprets ``/'' as the beginning of a qualifier. Notice the difference in behavior on some systems if the remote file specification is and is not quoted.
Enables you to obtain information about the MadGoat FTP utility.To obtain information about all of the FTP commands, enter the command:
FTP> HELPTo obtain information about individual commands or topics, enter the HELP command followed by the command or topic name.
Note
Some commands are not available at the FTP> prompt.
HELP
The HELP command provides a VMS help interface to the on-line documentation for the MadGoat FTP client.
/PAGE (D)
/NOPAGE
By default, the HELP command prompts the user the press RETURN for each screen of information. To disable paging, use HELP/NOPAGE.
/REMOTE
/NOREMOTE (D)
Asks the remote FTP server for help on the commands it supports. The /REMOTE qualifier must precede the topics on the command line. HELP/REMOTE is equivalent to the FTP command REMOTEHELP.
Sets the default file type to IMAGE. The IMAGE command is a synonym for SET TYPE IMAGE. See HELP SET TYPE for more information.
IMAGE
Changes the local default directory. LCD is a synonym for SET DEFAULT. See HELP SET DEFAULT for more information.
LCD directory
Transfers user information to the remote server.
LOGIN username
Command Qualifiers Defaults /ACCOUNT=account /ANONYMOUS /APASSWORD /PASSWORD=string
Once the username is sent to the remote system, FTP prompts for passwords and, if necessary, account information. If the account is specified, it is transferred when asked for or after login, if not requested.Some remote FTP servers allow you to relogin. They will automatically log you off your current session and restart the login process.
/ACCOUNT=string
Specifies the remote account name for the remote system. Most servers do not require an account name.
/ANONYMOUS
Specifies that the remote login should be as an anonymous user. Your password will default to local_user@local_host.
/APASSWORD
/NOAPASSWORD
Specifies that the anonymous password (local_user@local_host) should be sent. Specify /ANONYMOUS/NOAPASSWORD if you want to login anonymously and still be prompted for a password.
/PASSWORD=string
Specifies the password for the requested user account. This qualifier may only be used when a username is specified (explicitly via /USERNAME or implicitly via /ANONYMOUS). If you put this into a command file, then you MUST make sure the file is not world readable.
| #1 |
|---|
$ ftp fake
MadGoat FTP client V2.6-1 for OpenVMS VAX (1-OCT-1993)
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> login simmons
<331 Username "simmons" Okay, need password.
Password:
<230-Welcome to FAKE.BOGUS.COM, a MicroVAX II
<230-User "SIMMONS" logged in, 25-OCT-1993 10:35:43 EST, proceed.
<230 Connection closes if idle for 5 min.
FTP:fake>
|
In this example, a connection is made to a VMS system and the LOGIN command is used to specify the remote username.
| #2 |
|---|
$ ftp fake
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> login/anonymous
<331 Guest login Okay, send ident or e-mail address as password.
<230-Howdy, stranger!
<230-Guest SIMMONS@kiss.com login Okay, 25-OCT-1993 10:38:25 EST, access restrictions apply.
<230 Connection closes if idle for 5 min.
FTP:fake>
|
In this example, the /ANONYMOUS qualifier is used to log in as a guest on the remote system.
| #3 |
|---|
FTP:fake> login guest/apassword
<331 Guest login Okay, send ident or e-mail address as password.
<230-Guest SIMMONS@kiss.com login Okay, 10-AUG-1994 13:26:28 EST, access restrictions apply.
<230 Connection closes if idle for 5 min.
|
In this example, the /APASSWORD qualifier is used to send the anonymous password for a user other than anonymous.
Reinitializes the connection to the remote host, logging you out if you are logged in. LOGOUT uses the remote REIN command, which is not supported by all FTP servers.BYE is a synonym for LOGOUT.
The LOGIN or USER commands can be used to log back in to the remote host.
LOGOUT
| #1 |
|---|
$ ftp fake
MadGoat FTP client V2.6-1 for OpenVMS VAX (1-OCT-1993)
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> login simmons
<331 Username "simmons" Okay, need password.
Password:
<230-Welcome to FAKE.BOGUS.COM, a MicroVAX II
<230-User "SIMMONS" logged in, 25-OCT-1993 10:43:36 EST, proceed.
<230 Connection closes if idle for 5 min.
FTP:fake> logout
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> login stanley
<331 Username "stanley" Okay, need password.
Password:
<230-Welcome to FAKE.BOGUS.COM, a MicroVAX II
<230-User "STANLEY" logged in, 25-OCT-1993 10:43:36 EST, proceed.
<230 Connection closes if idle for 5 min.
FTP:fake>
|
In this example, the remote account logged in to is SIMMONS. The LOGOUT command is then used to log out of the remote system, but still maintain the connection so that another LOGIN command can be issued to log in to another account.
Requests a directory listing from the remote host. LS is a synonym for DIRECTORY. See HELP DIRECTORY for more information.
LS remote-file-list
Retrieves multiple files from a remote system. MRECEIVE and GET/WILD are synonyms for MGET.
MGET remote-file-list [local-file]
Command Qualifiers Defaults /APPEND /NOAPPEND /BLOCKSIZE=n /BLOCKSIZE=512 /CONFIRM /NOCONFIRM /HASH /NOHASH /LOG /NOLOG /MODE=mode /MODE=STREAM /PROMPT /NOPROMPT /RECURSIVE /NORECURSIVE /RETAIN /NORETAIN /STRUCTURE=structure /STRUCTURE=DEFAULT /TYPE=type[:format] /TYPE=ASCII:NON_PRINT /WILD /WILD
remote-file-list
Specifies a file specification pattern to be interpreted at the remote site. This can be a list of comma-separated file specifications. Each file name can contain ``wild'' characters such as ``*''. The definition of the wild character is determined by the remote host conventions:
- VMS uses ``*'' for any string and ``%'' for any character.
- UNIX uses ``*'' for any string and ``?'' for any character.
[local-file]
Specifies the name the transferred file is to have on the local system. Any missing fields in the local file name are filled in from the the remote file name. The local-file can consist of only a device and directory, if desired.
MGET gets a list of files to transfer from the remote system and then retrieves each of the files in the list. In this way, it is possible to specify wildcards such as ``*''.While the transfer is in-progress, the state of the transfer can be checked by pressing either [CTRL-T] or [CTRL-A]. While a file is being transferred, FTP displays the file name, the number of bytes already transferred, the percentage of the total size transferred, and the current transfer rate.
/APPEND
/NOAPPEND (D)
Appends the remote-file(s) to the specified local-file.
/BLOCKSIZE=n
When transferring a file with /TYPE=IMAGE and /STRUCTURE=FILE, FTP will receive the binary file using the blocksize that you specify. The default is 512 bytes, which is suitable for most VMS binary files, including executable images (fixed-length 512-byte records). A different blocksize would be appropriate when transferring VMS BACKUP savesets, for example.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL-Z] Quits the transfer By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/HASH
/NOHASH (D)
Temporarily enable or disable the HASH (HASH or NOHASH).
When Hash is enabled and a file is transferred from one machine to another, a hash mark is displayed for each 1024 characters of data that is transferred.
By default, no hash marks are displayed as the data is being transferred. You can change this with the FTP command SET HASH.
Note that [CTRL-A] and [CTRL-T] can be used to display a line indicating the state of the transfer.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/MODE=mode
Attempts to negotiate a different data transfer mode. The following options may be specified:
- BLOCK
- STREAM (default)
- COMPRESSED
For more information on the modes, see HELP SET MODE.
/PROMPT
/NOPROMPT (D)
Causes FTP to prompt for the local file name before transferring each file. The default action is to base the local file name on the remote file name./RECURSIVE
/NORECURSIVE (D)
If the command specifies a list of files from a series of directories and subdirectories, FTP will attempt to recreate the same directory tree structure as well as transferring the files into the same subdirectories. You may specify a directory tree with [...] to a remote VAX or with file name "-FR" to a remote UNIX (BSD) host.Currently, /RECURSIVE only works for UNIX and VMS systems. The option PATH_PARSING must be set to ON.
This assumes that UNIX hosts put out the following for recursive operations
file file ./dir: file file ./dir/sub (This is only true for BSD systems.) or file dir/file dir/subdir/file This assumes that the VMS systems send file specs as:
file.ver or Device:[dir]file.ver /RETAIN
/NORETAIN (D)
Specifies whether or not file version numbers are to retained when files are copied from the remote system. If /RETAIN is specified, or the version number is explicitly specified, the version number is retained on the output file name./STRUCTURE=structure
Attempts to negotiate a different file structure before the file contents are transferred.The following options may be specified:
- FILE (default)
- PAGE
- VMS (automatically negotiated)
The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system.
/TYPE=type[:format]
Attempts to negotiate a new data type before the file data is transferred. The following options may be specified:
- ASCII (default)
- IMAGE
- EBCDIC (not implemented)
There are 3 different ASCII formats: NON_PRINT, CONTROL, and TELNET. If the data type is ASCII:NON_PRINT or ASCII:TELNET, the file is stored on VMS as a sequential file with variable-length record format and carriage-return carriage control for record attribute. If the type is ASCII:CONTROL, it is stored with Fortran carriage control.
If the data type is IMAGE the file is stored on VMS as a sequential file with fixed-length 512-byte records and no record attributes. The /BLOCKSIZE qualifier may be specified to override default blocksize of 512 bytes.
/WILD (D)
/NOWILD
Determines whether or not wildcards are expanded by asking the remote host for a list of possible file names.
| #1 |
|---|
FTP:ftp.wku.edu> set noreply
FTP:ftp.wku.edu> mget *.cld
Obtaining name list for '*.CLD' from remote host
Retrieving file FTP.CLD;18 to FTP.CLD
Transferred 437 bytes in 00:00:00.66 = 662 bytes/Second
Retrieving file FTP_PARSE.CLD;70 to FTP_PARSE.CLD
Transferred 25083 bytes in 00:00:04.91 = 5108 bytes/Second
Retrieving file FTP_PARSE_NO_HOST.CLD;28 to FTP_PARSE_NO_HOST.CLD
Transferred 11689 bytes in 00:00:02.60 = 4495 bytes/Second
Retrieving file FTP_TMP.CLD;1 to FTP_TMP.CLD
Transferred 1007 bytes in 00:00:00.64 = 1573 bytes/Second
FTP:ftp.wku.edu>
|
In this example, all files with file type .CLD are retrieved from a VMS system.
| #2 |
|---|
FTP:unix> set noreply
FTP:unix> mget /usr/goat/.lo*
%CLI-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement
\USR\
FTP:unix> mget "/usr/goat/.lo*"
Obtaining name list for '/usr/goat/.lo*' from remote host
Retrieving file /usr/goat/.login to $login
Transferred 695 bytes in 00:00:00.49 = 1418 bytes/Second
Retrieving file /usr/goat/.logout to $logout
Transferred 63 bytes in 00:00:00.42 = 150 bytes/Second
FTP:unix>
|
If the remote file specification includes ``/'', it will be necessary to enclose the entire remote file specification in double quotes, because the FTP command interpreter interprets ``/'' as the beginning of a qualifier.
Creates a remote directory. MKDIR is a synonym for CREATE/DIRECTORY. See HELP CREATE/DIRECTORY for more information.
MKDIR directory
Modify an alias in the FTP alias database. See HELP ALIAS MODIFY for more information.
Mounts a volume on the remote system. MOUNT is not supported by many FTP servers.
MOUNT volume-name
volume-name
Specifies the name of the remote volume that is to be mounted.
Sends a file or group of files to a remote system.
MPUT local-file-list [remote-file]
Command Qualifiers Defaults /BACKUP /NOBACKUP /BEFORE[=time] None. /CONFIRM /NOCONFIRM /CREATED /NOCREATED /EXPIRED /NOEXPIRED /HASH /NOHASH /LOG /NOLOG /MODE=mode /MODE=STREAM /MODIFIED /NOMODIFIED /PROMPT /NOPROMPT /SINCE[=time] None. /RECURSIVE /NORECURSIVE /RETAIN /NORETAIN /STRUCTURE=structure /STRUCTURE=DEFAULT /UNIQUE /NOUNIQUE /TYPE=type[:format] /TYPE=ASCII:NON_PRINT /UNIQUE /NOUNIQUE
local-file-list
Specifies the names of one or more files that are to be copied from the local system to the remote system. Multiple file names must be separated by commas.Items in the list may contain wildcard characters.
[remote-file]
Specifies the name the transferred file is to have on the remote system.If the remote file is unspecified, FTP either constructs a name from the local file name or, if /PROMPT is used, prompts for a remote name.
MPUT searches for all files matching the file names specified in the local file list. Each file that is found is transferred to the remote system. Wildcard characters ``*'' and ``%'' may be used.The FTP utility will first look at the file and record characteristics for each local file. It will then attempt to negotiate the appropriate file transfer parameters (Mode, Structure and Type) before each file is transferred. Once the appropriate file transfer parameters have been negotiated, the file contents are sent.
If a matching local file is a directory, FTP attempts to create a directory on the remote host.
While the transfer is in-progress, the state of the transfer can be checked by pressing either [CTRL-T] or [CTRL-A]. While a file is being transferred, FTP displays the file name, the number of bytes already transferred, the percentage of the total size transferred, and the current transfer rate.
/BACKUP
/NOBACKUP (D)
Selects files using the backup date. Valid only when used in conjunction with /SINCE and /BEFORE.
/BEFORE[=time]
Transfers only those files dated prior to the specified time. You can specify time as an absolute time, as a combination of absolute and delta times, or as one of the following keywords: TODAY (default), TOMORROW, or YESTERDAY. Specify one of the following qualifiers with the /BEFORE qualifier to indicate the time attribute to be used as the basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL-Z] Quits the transfer By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/CREATED (D)
/NOCREATED
Selects files using the creation date. Valid only when used in conjunction with /SINCE and /BEFORE. This is the default date used for file selection by date.
/EXPIRED
/NOEXPIRED (D)
Selects files using the expiration date. Valid only when used in conjunction with /SINCE and /BEFORE.
/HASH
/NOHASH (D)
Temporarily enable or disable the HASH (HASH or NOHASH).
When Hash is enabled and a file is transferred from one machine to another, a hash mark is displayed for each 1024 characters of data that is transferred.
By default, no hash marks are displayed as the data is being transferred. You can change this with the FTP command SET HASH.
Note that [CTRL-A] and [CTRL-T] can be used to display a line indicating the state of the transfer.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/MODE=mode
Attempts to negotiate a different data transfer mode. The following options may be specified:
- BLOCK
- STREAM (default)
- COMPRESSED
For more information on the modes, see HELP SET MODE.
/MODIFIED
/NOMODIFIED (D)
Selects files using the modified (revised) date. Valid only when used in conjunction with /SINCE and /BEFORE.
/PROMPT
/NOPROMPT (D)
Causes FTP to prompt for the local file name before transferring each file. The default action is to base the local file name on the remote file name./RECURSIVE
/NORECURSIVE (D)
If the command specifies a list of files from a series of directories and subdirectories, FTP will attempt to recreate the same directory tree structure as well as transferring the files into the same subdirectories. You may specify a directory tree with [...] to a remote VAX or with file name "-FR" to a remote UNIX (BSD) host.Currently, /RECURSIVE only works for UNIX and VMS systems. The option PATH_PARSING must be set to ON.
This assumes that UNIX hosts put out the following for recursive operations
file file ./dir: file file ./dir/sub (This is only true for BSD systems.) or file dir/file dir/subdir/file This assumes that the VMS systems send file specs as:
file.ver or Device:[dir]file.ver /RETAIN
/NORETAIN (D)
Specifies whether or not file version numbers are to retained when files are copied from the remote system. If /RETAIN is specified, or the version number is explicitly specified, the version number is retained on the output file name./SINCE[=time]
Transfers only those files dated after the specified time. You can specify time as an absolute time, as a combination of absolute and delta times, or as one of the following keywords: TODAY (default), TOMORROW, or YESTERDAY. Specify one of the following qualifiers with the /SINCE qualifier to indicate the time attribute to be used as the basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.
/STRUCTURE=structure
Attempts to negotiate a different file structure before the file contents are transferred.The following options may be specified:
- FILE (default)
- PAGE
- VMS (automatically negotiated)
The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system.
/TYPE=type[:format]
Attempts to negotiate a new data type before the file data is transferred. The following options may be specified:
- ASCII (default)
- IMAGE
- EBCDIC (not implemented)
There are 3 different ASCII formats: NON_PRINT, CONTROL, and TELNET. If the data type is ASCII:NON_PRINT or ASCII:TELNET, the file is stored on VMS as a sequential file with variable-length record format and carriage-return carriage control for record attribute. If the type is ASCII:CONTROL, it is stored with Fortran carriage control.
If the data type is IMAGE the file is stored on VMS as a sequential file with fixed-length 512-byte records and no record attributes. The /BLOCKSIZE qualifier may be specified to override default blocksize of 512 bytes.
/UNIQUE
Tells the remote host to create a new name for the file if the file already exists in the remote default directory. The name of the file is specified in the reply from the server./WILD (D)
/NOWILD
Determines whether or not wildcards are expanded by asking the remote host for a list of possible file names.
| #1 |
|---|
FTP:ftp.wku.edu> set noreply
FTP:ftp.wku.edu> mput *.cld
Sending file SYS$USER:[SIMMONS.EXP.FTP]FTP.CLD;18 to FTP.CLD
Transferred 437 bytes in 00:00:00.53 = 824 bytes/Second
Sending file SYS$USER:[SIMMONS.EXP.FTP]FTP_PARSE.CLD;70 to FTP_PARSE.CLD
Transferred 25083 bytes in 00:00:02.68 = 9359 bytes/Second
Sending file SYS$USER:[SIMMONS.EXP.FTP]FTP_PARSE_NO_HOST.CLD;28 to
FTP_PARSE_NO_HOST.CLD
Transferred 11689 bytes in 00:00:01.51 = 7741 bytes/Second
Sending file SYS$USER:[SIMMONS.EXP.FTP]FTP_TMP.CLD;1 to FTP_TMP.CLD
Transferred 1007 bytes in 00:00:00.51 = 1974 bytes/Second
|
The example above sends all files with extension ``.CLD''.
Retrieves multiple files from a remote system. MRECEIVE is a synonyms for MGET. See HELP MGET for more information.
MRECEIVE remote-file-list [local-file]
Sends multiple files to a remote system. MSEND is a synonyms for MPUT. See HELP MPUT for more information.
MSEND local-file-list [remote-file]
Renames a file on the remote system.MV is a synonym for RENAME. For more information, see HELP RENAME.
MV old-file new-file
Sends a NOOP command to the remote system.
NOOP
The NOOP command is useful for testing purposes.
Enables or modifies the FTP error-handling ability.
ON condition action
condition
Specifies the condition to be handled. Valid conditions are:
- CONTROL_C
- ERROR
- SEVERE
- WARNING
action
Specifies the action that is to be taken. Valid actions are:
- ABORT
- CONTINUE
- EXIT
Change or modify the handling of CONTROL_C.
ON CONTROL_C action
Command Qualifiers Defaults None. None.
The default setting is so that when the user types Control-C, any current commands are aborted and control is returned to the ``FTP>'' prompt.If the setting is ABORT, the FTP utility stops what it is doing and returns to the FTP> prompt.
If the setting is CONTINUE, the Control-C is effectively ignored.
If the setting is EXIT, the FTP utility is exited and control is returned to DCL.
If you really want to exit the FTP utility, type [CTRL-Y]. [CTRL-Y] is not trapped by the FTP utility.
The current setting can be examined by issuing the FTP command SHOW CONDITION.
| #1 |
|---|
FTP:ftp.wku.edu> on control_c abort
FTP:ftp.wku.edu> dir
<200 Type A N ok.
<200 Port 161,6,5,4,98,148 Okay.
[CTRL-C]
*CANCEL*
Operation aborted due to Control-C.
-SYSTEM-S-CONTROLC, operation completed under CTRL/C
FTP:ftp.wku.edu>
|
In this example, a DIRECTORY command is interrupted with a Control-C.
Change or modify the handling of errors.
ON ERROR action
Command Qualifiers Defaults None. None.
The default setting is so that when an error is encountered any current commands are aborted and control is returned to the ``FTP> '' prompt.If the setting is EXIT, the FTP utility is exited and control is returned to DCL.
This command is useful when batch jobs should be aborted upon first unsuccessful FTP command.
The most common errors are:
- The remote system is not available. This may be due to hardware or network failure.
- Login failure. Verify that the password is correct. Also check that username didn't get case folded.
- Remote file unavailable. This may be due to incorrectly specified file name.
The current setting can be examined by issuing the FTP command SHOW CONDITION.
| #1 |
|---|
FTP:unix> on error abort
FTP:unix> get unknown.file
<200 Port 4.11 at host 161.6.5.4 accepted.
<550 File not accessible.
Requested action not taken. File unavailable.
FTP:unix> on error exit
FTP:unix> get unknown.file
<200 Port 4.12 at host 161.6.5.4 accepted.
<550 File not accessible.
Requested action not taken. File unavailable.
$
|
This example shows the difference in behaviour of the two settings for error handling.
Change or modify the handling of SEVERE or FATAL errors
ON SEVERE action
Command Qualifiers Defaults None. None.
The default setting is so that when a severe error is encountered the FTP utility immediately exits.If the setting is ABORT control is immediately returned to the ``FTP> '' prompt.
Usually Severe or Fatal errors indicate something wrong in the logic of the FTP utility. The setting should be left on EXIT.
The current setting can be examined by issuing the FTP command SHOW CONDITION.
Change or modify the handling of warning signals
ON WARNING action
Command Qualifiers Defaults None. None.
The default setting is so that when a warning is encountered, the FTP utility immediately returns to the ``FTP> '' prompt.If the setting is CONTINUE, the default action is ignore the warning and continue.
If the setting is EXIT, the FTP utility is exited and control is immediately returned to DCL.
The most common cause of warnings is incorrectly specified commands. Like ``FTP:host> DLEETE FOO.BAR'' instead of ``FTP:host> DELETE FOO.BAR''.
The current setting can be examined by issuing the FTP command SHOW CONDITION.
| #1 |
|---|
FTP:ftp.wku.edu> on warning abort
FTP:ftp.wku.edu> logni simmons
%CLI-W-IVVERB, unrecognized command verb - check validity and spelling
\LOGNI\
FTP:ftp.wku.edu> on warning exit
FTP:ftp.wku.edu> logni simmons
%CLI-W-IVVERB, unrecognized command verb - check validity and spelling
\LOGNI\
<221 Service closing control connection.
$
|
This example shows two different settings for handling warnings. The FTP utility command ``LOGIN'' is mistyped ``logni''.
Opens a connection to a remote host. OPEN is a synonym for SET HOST. See HELP SET HOST for more information.
Transmits a local file to the remote host. PUT is a synonym for the MPUT command. See HELP MPUT for more information.
PUT local-file-list [remote-file]
Displays the remote default directory. PWD is a synonym for SHOW REMOTE. See HELP SHOW REMOTE for more information.
PWD
Close the connection to the remote host and exit the FTP utility.
QUIT
Sends a string directly to the remote FTP server.
QUOTE command-line
command-line
Line of text to be sent to the remote FTP server. For a list of the commands supported by the remote FTP server, type REMOTEHELP or HELP/REMOTE.
The entire command-line is directly transmitted to the remote host FTP Server. The command string is not verified for correctness or validity.This command is useful only to wizards who understand the logic in the File Transfer Protocol.
| #1 |
|---|
FTP:unix> set command
Server command display is now on
FTP:unix> show rem
>PWD
<257 "/usr1/simmons" is current directory.
FTP:unix> quote xpwd
>XPWD
<257 "/usr1/simmons" is current directory.
FTP:unix>
|
In this example, it is obvious that PWD and XPWD do the same thing.
RECEIVE is a synonym for the GET command. See HELP GET for more information.
RECEIVE remote-file-list [local-file]
Asks the remote FTP server for help on the commands it supports..
REMOTEHELP [topic]
topic
Specifies the remote topic for which help is to be displayed.
The remote host is sent the FTP HELP command with a topic, if specified. Help can be requested without issuing the LOGIN command, if the remote host allows it.The list of commands that are returned are not commands available to the user of the FTP utility, but are instead a list of commands for the underlying File Transfer Protocol. See the entry for the QUOTE command for more information.
| #1 |
|---|
FTP:unix> remotehelp
<214-The following commands are recognized (* =>'s unimplemented).
< USER PORT STOR MSAM* RNTO NLST MKD CDUP
< PASS PASV APPE MRSQ* ABOR SITE XMKD XCUP
< ACCT* TYPE MLFL* MRCP* DELE SYST RMD STOU
< SMNT* STRU MAIL* ALLO CWD STAT XRMD SIZE
< REIN* MODE MSND* REST XCWD HELP PWD MDTM
< QUIT RETR MSOM* RNFR LIST NOOP XPWD
<214 Direct comments to ftp-bugs@wkunix.wku.edu.
FTP:unix>
|
The remote server will provide a list of commands and features that are legal or implemented.
Changes the name of a file on the remote system.
RENAME old-file new-file
old-file
Specifies the remote file that is to be renamed.new-file
Specifies the new file name for the file on the remote system.
| #1 |
|---|
FTP:fake-unix> send sys$login:login.com x.x
<200 PORT command successful.
<150 Opening data connection for x.x (161.6.5.4,19318).
<226 Transfer complete.
417 bytes (1 block) in 00:00:00.41 = 1017 cps, IO=1
Sent file DJB2:[SIMMONS]LOGIN.COM;1 to (Remote) x.x
FTP:fake-unix> rename x.x vmslogin.com
<350 File exists, ready for destination name
<250 RNTO command successful.
FTP:fake-unix>
|
In this example, the file LOGIN.COM is sent to the remote system as X.X. The RENAME command is then used to rename the file to VMSLOGIN.COM.
Deletes a file on the remote system.RM is a synonym for DELETE. For more information, see HELP DELETE.
RM remote-file-list
Deletes a remote directory. RMDIR is a synonym for DELETE/DIRECTORY. See HELP DELETE/DIRECTORY for more information.
RMDIR directory
Transmits a local file to the remote host. SEND is a synonym for the PUT command. See HELP PUT for more information.
Defines, or changes, various FTP settings.
SET option
These are the SET command options:
Option Function ACCOUNT Changes remote account. AUTOPROMPT Enables or disables prompting for missing output file names. BATCH Enables or disable transfer failure prompts. BELL Enables or disables ringing of terminal bell after file transfers. CASE Specifies how the case of parameters is affected. CHECK_TYPE Enables or disables automatic file type sensing when sending files. COMMAND Enables or disables the display of lower-level FTP commands. CONFIRM Enables or disables confirmation prompts during multiple-file transfers. DEFAULT Changes the local default directory. HASH Enables or disables printing of hash marks during transfers. HOST Opens a connection to a remote host. LOCAL_DEFAULT_DIRECTORY Changes the local default directory. MODE Specifies the default file transfer MODE. PASSIVE Enable or disables passive mode transfers. PATH_PARSING Enables or disables attempts to parse remote file paths. PROMPT Changes the FTP prompt when connected to a remote host. PROTECTION Changes the protection on a remote file. QUIET Enables or disables display of messages. REMOTE_DEFAULT_DIRECTORY Changes remote default directory. REPLY Enables or disables display of replies from remote server. RETAIN Enables or disables the retention of file version numbers. STRUCTURE Negotiates the default structure (STRU) format for file transfers. TYPE Negotiates the default file type (TYPE) for file transfers. VERIFY Enables or disables the display of commands read from an FTP command file.
Changes the account usage for the remote host.
SET ACCOUNT account-name
Command Qualifiers Defaults None. None.
account-name
Specifies the name of an account on the remote system.
SET ACCOUNT specifies the account on the remote system to which resource usage is charged. Many servers, especially VMS servers, do not implement accounts. This command is superfluous at these sites.
| #1 |
|---|
FTP:fake> set account unknown
<530 Account not valid.
Not logged In.
FTP:fake> set account systems
<230 Account OK.
FTP:fake>
|
This example shows successful and unsuccessful use of the SET ACCOUNT command.
Enables or disables prompting for omitted output file names on GET and PUT.
SET AUTOPROMPT
SET NOAUTOPROMPT (default)
If AUTOPROMPT is enabled, you are prompted for any omitted output file name when transferring a file in either direction. Most UNIX FTP clients prompt by default.
Enables or disables prompts for file transfer failures.
SET BATCH
SET NOBATCH (default)
If a file transfer fails with a possibly recoverable error, you can have FTP prompt you as to whether or not you wish to retry the transfer using the SET CONFIRM command.When NOBATCH is specified, you are not prompted for retry.
Enables or disables the ringing of the terminal bell after file transfers.
SET BELL
SET NOBELL (default)
The SET BELL command can be used to have FTP audibly notify you when a file transfer completes.If BELL is set, the terminal bell will ring for both successful transfers and failures.
Controls the capitalization of switches and parameters.
SET CASE state
state
Specifies how the command interpreter modifies the case of command parameters. Valid values are:
- LOWER - converts all parameters to lowercase
- NORMAL (default) - leaves the parameters in the specified case
- UPPER - converts all parameters to uppercase
The MadGoat FTP client uses the VMS CLI$ routines to parse the commands you enter. However, because many FTP sites are UNIX systems that are case-sensitive with regard to filenames, the client will, by default, attempt to preserve the case of any command parameters you enter.The client usually preserves case sensitivity, so this command is now almost obsolete. It remains in the command set to maintain backwards compatibility with earlier versions of FTP. FTP will not preserve case properly if the same ``name'' appears twice in a command with different case. The first name is the one used.
The case is preserved for all parameters that are explicitly prompted.
Enables or disables the automatic sensing of file data types (ASCII or binary) when files are PUT to a remote system.
SET CHECK_TYPE (default)
SET NOCHECK_TYPE
By default, if no file type has been set using SET TYPE or its synonyms (ASCII, BINARY), the MadGoat FTP client will try to automatically determine the proper type, based on the RMS attributes of the file. SET NOCHECK_TYPE disables the autosensing of the type.
Enables or disables the display of lower-level FTP protocol commands.
SET COMMAND
SET NOCOMMAND (default)
The FTP utility negotiates with the remote host by sending commands and receiving replies. SET COMMAND causes the FTP utility to display the commands as they are sent to the remote system.
| #1 |
|---|
FTP:ftp.wku.edu> set nocommand
Server command display is now off
FTP:ftp.wku.edu> noop
<200 Noop Okay.
FTP:ftp.wku.edu> set command
Server command display is now on
FTP:ftp.wku.edu> noop
>NOOP
<200 Noop Okay.
FTP:ftp.wku.edu>
|
In this example, the same command is performed twice. The first time with NOCOMMAND set (the default) and the second time with COMMAND set. Notice that the right angle bracket (>) precedes the command, while the left bracket (<) precedes the reply.
Enables or disables confirmation prompts during multiple-file transfers.
SET CONFIRM
SET NOCONFIRM (default)
The FTP utility is capable of performing several file transfers or other operations in one command. If CONFIRM is enabled, you are prompted before each operation.You may answer Yes, No, Quit, or All. Yes means transfer it, while No means do not. Quit stops transferring altogether while All transfers all the rest, and stops asking questions.
Changes the default, or current, directory on the remote system. When not connected to a remote system, the local default is changed.
SET DEFAULT dir-spec
dir-spec
Specifies the name of the directory on the remote system which will be the remote default for file operations.
This command is very similar to the DCL command SET DEFAULT. When you are connected to a remote system, it is the default directory on the remote system that is changed.
Enables or disables printing of hash marks during file transfers.
SET HASH
SET NOHASH (default)
When HASH is enabled, a hash character (#) is displayed for every 1024 bytes of data transferred. When HASH is disabled, no hash character is displayed.Hash is a way to judge whether there is actually anything going on. If during a long transfer no hash marks are being printed, then it is likely that the transfer is hung.
Opens a connection to a remote host. CONNECT and OPEN are synonyms for SET HOST.
SET HOST host-name
Command Qualifiers Defaults /ACCOUNT=name /NOACCOUNT /ANONYMOUS /APASSWORD /PORT=port-name /PORT=FTP /PASSWORD=string /NOPASSWORD /USERNAME=name /NOUSERNAME
host-name
Specifies the name or numeric IP address of the remote system to which and FTP session is initiated.
If a connection is already open, the connection will be closed and a new connection will be opened to the specified host. If the host name specified via an alias, then other connection information may be take from the alias record. Alias information can be overridden by qualifiers. For example, a username specified in a /USERNAME qualifier takes precedence over a username in an alias record. See HELP ALIAS for more information on aliases.The MADGOAT_FTP_USER_PROMPT logical name controls whether the MadGoat FTP client prompts for a username upon connecting to a remote host. Qualifiers for a LOGIN command may also be entered at this prompt. If a username is not specified, then the local username will be used.
The MadGoat FTP client will not prompt for a username if the value of MADGOAT_FTP_USER_PROMPT starts with ``N'' or ``F.'' This can be useful for overriding a system-wide definition of MADGOAT_FTP_USER_PROMPT.
Note
Regardless of whether MADGOAT_FTP_USER_PROMPT is defined, the MadGoat FTP client will not prompt for a username if /ANONYMOUS OR /USERNAME is specified.
/ACCOUNT=name
Requests login to a specific user account. This may only be used if a username is specified.
/ANONYMOUS
Specifies that the remote login should be as an anonymous user. Your password will default to local_user@local_host.
/APASSWORD
/NOAPASSWORD
Specifies that the anonymous password (local_user@local_host) should be sent. Specify /ANONYMOUS/NOAPASSWORD if you want to login anonymously and still be prompted for a password.
/PASSWORD=string
Specifies the password for the requested user account. This may only be used if a username is specified. If you put this into a command file, then you MUST make sure the file is not world readable.
/PORT=port-number
port-name
FTP (D)
Allows you to specify an alternate port for the FTP connection. Normally the FTP port is number 21. This qualifier is not normally used.
/USERNAME=name
Specifies the username for the remote login.
| #1 |
|---|
FTP:fake-unix> show host
Connection open to fake-unix.bogus.com
FTP:fake-unix> set host fake
<221 Goodbye.
Transfer Okay; Connection Closing
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> sho host
Connection open to fake.bogus.com
FTP:fake>
|
In this example, the SET HOST command is used to change the remote host to which a connection is established.
| #2 |
|---|
FTP> set host fake
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
Username [simmons]: /anonymous
%FTP-I-LOGIN, Attempting to login to user anonymous
<331 Guest login Okay, send ident or e-mail address as password.
<230-Welcome to FAKE.BOGUS.COM, a MicroVAX II
<230-Guest SIMMONS@kiss.com login Okay, 7-JUN-1994 16:23:27 EST, access restrictions apply.
<230 Connection closes if idle for 5 min.
FTP:fake>
|
In this example, the MADGOAT_FTP_USER_PROMPT logical name is defined. The /ANONYMOUS qualifier entered at the prompt is used to build a LOGIN command. If a username is not given on the prompt line, the MadGoat FTP client attempts to login with the default username. Pressing [Ctrl-Z] at the prompt will abort the login attempt.
| #3 |
|---|
FTP> show alias test/full
Alias: TEST
Description:
Host: alpha.wku.edu
Username: anonymous
Password: SIMMONS@kiss.com
FTP> set host test
%FTP-I-ALIASTRANS, Alias TEST translated to host name alpha.wku.edu
%FTP-I-ATTEMPTING, Attempting to connect to host alpha.wku.edu
<220 alpha.wku.edu MadGoat FTP server V2.6-1 for OpenVMS Alpha (11-AUG-1994) ready.
%FTP-I-LOGIN, Attempting to login to user anonymous
<331 Guest login Okay, send ident or e-mail address as password.
<230-Guest SIMMONS@kiss.com login Okay, 11-AUG-1994 10:58:26 CDT, access restrictions apply.
<230 Connection closes if idle for 5 min.
FTP:alpha.wku.edu>
|
In this example, an alias name is translated to determine the host name, username, and password. See HELP ALIAS for more information on the FTP alias database.
Specifies the default file transfer mode parameter (MODE).
SET MODE mode
mode
Specifies the FTP MODE parameter for file transfers. Valid modes are:
- STREAM (default)
- BLOCK
- COMPRESSED
STREAM mode sends the data as a stream of bytes. This is the normal MODE for sending data. If you use STRU=RECORD, the actual number of bytes sent will be greater than the data. This is necessary to be able to send the end-of-record and end-of-file information. This mode must be supported by all FTP implementations. The other modes may not be supported by other versions of FTP.BLOCK mode sends the data as a series of blocks. This mode is the best one to use with STRU=RECORD, as it will be more efficient than STREAM mode. In addition, BLOCK mode does not need to close and open the data channel for each file transferred. As a result you can transfer an unlimited number of files in block mode, without exhausting the maximum number of connections.
COMPRESSED mode compresses the data on the fly. Currently, compressed data can be handled, except when STRU=PAGE. The actual amount of compression may be small, since it only compresses repeated sequences of single bytes.
Enables or disables passive mode transfers.
SET PASSIVE
SET NOPASSIVE (default)
FTP file transfers between a client and a server are normally accomplished by the client sending a PORT command to the server to tell it what TCP port it will be using for the transfer. The server then establishes a connection back to the client using that port for the actual transfer. This arrangement won't work behind firewalls, because the firewall will typically block the connection request from the server to the client.When passive mode is enabled, all connections are made from the client to the server; the server does not attempt to initiate a connection back to the client. Specifically, the client sends a PASV command to the server instead of the PORT command. The server identifies a port and sends a reply back to the client identifying the port on which it's listening for a connection. The client then establishes the connection using the specified port, and the file transfer is completed.
Enables or disables attempts to parse remote file paths.
SET PATH_PARSING (default)
SET NOPATH_PARSING
When PATH_PARSING is enabled, as it is by default, MGET and DELETE commands will attempt to parse requested list of files to be able to perform recursive operations properly. In other words, when enabled, it will try to figure out where the files are located, and whether they are directories, according to the rules of the remote system.This may interfere with operations if the remote system has a ``squirrely'' implementation of FTP. It should understand both UNIX and VMS systems.
Changes the FTP client prompt when connected to a remote host.
SET PROMPT[=prompt]
When you are connected to a remote FTP server, the FTP client prompt is FTP:, followed by the name of the remote host. For example:
FTP:ftp.spc.edu>The SET PROMPT command can be used to specify a different prompt. To reset the prompt to the default, just give SET PROMPT with no prompt. Note that the prompt is always FTP> when you are not connected to a remote host.
If the desired prompt includes lower-case letter or spaces, it must be surrounded by double quotes:
FTP:ftp.spc.edu> SET PROMPT="What? " What?
Changes the protection on a remote file and changes the default remote file protection.
SET PROTECTION=(code) [remote-file-list]
Command Qualifiers Defaults /CONFIRM /NOCONFIRM /DEFAULT /NODEFAULT /LOG /NOLOG /WILD /WILD
code
Specifies the file protection in the normal VMS format:
(OWNER:RWED,GROUP:RWED,WORLD:RWED)The fields ``RWED'' specify Read, Write, Execute, and Delete permission. If a user (OWNER,GROUP,WORLD) is omitted then all permission is denied.
remote-file-list
Specifies a file specification pattern to be interpreted at the remote site. This can be a list of comma-separated file specifications. Each file name can contain ``wild'' characters such as ``*''. The definition of the wild character is determined by the remote host conventions:
- VMS uses ``*'' for any string and ``%'' for any character.
- UNIX uses ``*'' for any string and ``?'' for any character.
SET PROTECTION sets the current default file protection or sets the protection on one or more remote files.This command is not supported by all remote FTP servers. An error message will be displayed if the remote server does not support it. To determine whether a server supports this command, try HELP/REMOTE. If SITE appears in the list, then try HELP/REMOTE SITE. If CHMOD and UMASK appear in the list, then it is probably supported.
/CONFIRM
/NOCONFIRM (D)
Prompts for a Yes, No, All, or Quit confirmation before each file is transferred. The following responses may be given:
Yes Transfers the file No Does not transfer and prompts for next transfer All Transfers the file and all subsequent files Quit Quits the transfer [CTRL-Z] Quits the transfer By default, the user is not prompted for confirmation. This default can be changed with the FTP commands SET CONFIRM and SET NOCONFIRM.
/DEFAULT
/NODEFAULT (D)
Modify the default remote file protection.
When this qualifier is used, you may not specify a file name.
/LOG (D)
/NOLOG
Temporarily enabled or disable the QUIET.
When /LOG is specified, you are notified after each file has been transferred.
By default, you are not notified. You can change this default by issuing the FTP commands SET QUIET and SET NOQUIET.
/WILD (D)
/NOWILD
Determines whether or not wildcards are expanded by asking the remote host for a list of possible file names.
Enables or disables the display of informational messages.
SET QUIET
SET NOQUIET (default)
By default, the FTP utility will display informational messages about file transfers that includes the statistics on the operation (bytes/sec transferred). If you do not want this information displayed, issue the command SET QUIET.The /LOG qualifier on the GET and PUT commands allows you to override the QUIET setting.
Change the default, or current, remote directory. CD, CWD, and CPATH are synonyms for SET REMOTE_DEFAULT_DIRECTORY.
SET REMOTE_DEFAULT_DIRECTORY remote-directory
This command is similar to the UNIX ``cd'' command and the VMS ``SET DEFAULT'' command.
| #1 |
|---|
FTP:ftp.wku.edu> show remote
<257 "SYS$USER:[SIMMONS]" is current directory.
FTP:ftp.wku.edu> set remote sys$system:
<250 Requested file action okay, completed.
FTP:ftp.wku.edu> show remote
<257 "SYS$SYSROOT:[SYSEXE]" is current directory.
FTP:ftp.wku.edu>
|
In this example, the default directory on the remote VMS system is changed to SYS$SYSTEM.
Enables or disables the display of the reply lines being sent back from the remote server.
SET REPLY (default)
SET NOREPLY
When REPLY is enabled, the full text of the replies from the remote server is shown. When disabled, the replies are filtered, so only essential information is passed to you. All extraneous negotiations, and nonessential informational replies are suppressed. In addition, the reply number is suppressed.
| #1 |
|---|
FTP:fake> set reply
Server reply display is now on
FTP:fake> noop
<200 Noop Okay.
FTP:fake> set noreply
Server reply display is now off
FTP:fake> noop
< Noop Okay.
FTP:fake>
|
Here, the NOOP command is issued twice. In the second case, the reply from the remote system is not displayed in full.
Enables or disables the retention of VMS file version numbers.
SET RETAIN
SET NORETAIN
SET RETAIN/DCL
mode
Specifies the version retention scheme. It can be enabled, disabled, or set to DCL mode.
Normally, the version numbers are stripped from file names before files are stored, unless the input file-name explicitly has the version number included in it.SET RETAIN/DCL is the default RETAIN option. It allows version numbers to be propagated from input to output file specs. This is the ``normal'' DCL convention.
SET RETAIN selects version number propagation as the default. The version number of the input file is used in creating the output file regardless of whether or not it was specified in the input file name.
SET NORETAIN selects no version number propagation as the default. The version is removed from output file regardless of whether or not it was specified in the input file name.
Negotiate the default structure (STRU) format for file transfers.
SET STRUCTURE structure
structure
Specifies the STRU format to use for file transfers. Valid STRU values are:
- FILE (default)
- RECORD
- VMS (default for VMS servers)
The normal transfer structure is FILE. The FILE structure provides a way to transfer the file contents from one system to another.RECORD structure will transfer files and maintain the record structure. This can only be used with systems that support RECORD structures. For transfer to a VMS system, the RECORD structure will produce variable-length records with carriage-return carriage control if TYPE=ASCII, and no carriage control if TYPE=IMAGE. This structure may not be supported by some implementations of FTP.
However, VMS has much extra information in its file system about a file that lies outside the contents of a file.
When VMS structure is used, the file organization, file attributes, record format and record attributes are sent over the data connection, in addition to the data. In this way, indexed and relative files with multiple keys and areas can be sent from one VMS system to another.
The VMS structure is an extension that is compatible with other VMS implementations of FTP. It is the default structure when connecting to a system which supports it. To see if the remote system handles the VMS structure, use the SHOW STATUS command.
FTP:fake> STATUS <211-Status FTP Server Process <211-Status The current data transfer parameters are: <211-Status MODE S <211-Status STRU O VMS <211 Status TYPE ANThe ``STRU O VMS'' indicates that the remote system is capable of handling the VMS file structure for file transfers.
Negotiates the default file type (TYPE) for file transfers.
SET TYPE ASCII format
SET TYPE IMAGE
SET TYPE EBCDIC
SET TYPE LOCAL byte-size
format
One of:
- CONTROL,
- NON_PRINT (default), or
- TELNET.
byte-size
Size of a byte on the local host, measured in bits.
Using the ASCII type, files are transferred as lines of text. Each line is separated by a carriage-return line-feed. If you send or receive a VMS text file with CR-LF embedded in a record, the record would be split into two records at the CR-LF when the file is received. A file that has an RMS record format of Stream, Stream Carriage Return, or Stream Line Feed will be sent with type ASCII, by default. In addition, any file with specified carriage-control record attributes will be sent using this type.The NON_PRINT and TELNET formats are treated the same way by MadGoat FTP. When an ASCII file is retrieved, the record format is always variable-length and the record attribute is Carriage Return. When a file is sent, the carriage control attributes are used to convert the file by inserting the appropriate control codes. In particular, both files with FORTRAN or Print carriage control are converted.
Format CONTROL is intended for use when sending files with Fortran (ASA) carriage control. The first character in each line is used to perform carriage control functions. If a file is received with this format, it will be variable-length with Fortran carriage control.
The ASA Standard specifies the following control characters:
- blank - Move paper up one line
- 0 - Move paper up two lines
- 1 - Move paper to top of next page
- + - No movement, i.e., overprint
VMS Fortran carriage control also recognizes $, and null. As a result, some Fortran output may not transfer properly. If this is a problem, use format NON_PRINT and the client will convert the file to NON_PRINT format. If you transfer a file with Fortran carriage control using the format NON_PRINT, the file is converted to the correct format.
Files with Fortran carriage control default to this format when they are sent with STRUCTURE RECORD.
Setting the file transfer type to EBCDIC causes FTP to transfer data in the EBCDIC format. This type is currently unsupported. Since FTP must have type ASCII, the EBCDIC can be translated by the other host.
The IMAGE type is used to transfer binary data, which essentially means any file that is not printable text. VMS images and savesets should be transferred using this type.
Setting the current transfer type to LOCAL allows the user to control the byte-size of the data transferred. This command should be used when you transfer files to and from a system with a different word size.
NOTE: By default, the type is automatically set for PUT and MPUT, unless specifically set with a SET TYPE command. You can override the current default by specifying the qualifier /TYPE on the PUT command.
| #1 |
|---|
FTP:fake> set type local 8
<200 Command Okay.
FTP:fake>
|
In this example, a byte size of 8 bits is negotiated.
Enables or disables VERIFY mode when executing command files.
SET VERIFY
SET NOVERIFY (default)
When VERIFY is enabled, commands read from a command file (executed with ``@'') will be echoed. By default, such commands are not echoed.
Displays the current settings for various FTP options.
SHOW option
These are the SHOW command options:
Option Displays ALIAS List the contents of the FTP alias database. AUTOPROMPT Current setting for missing output file prompts. BATCH Current BATCH mode setting. BELL Whether or not the terminal bell is rung after file transfers. CASE How the case of parameters is affected. CHECK_TYPE Status of file type autosensing. COMMAND Status of lower-level FTP command displays. CONFIRM Current confirmation prompt setting. CONDITION Current setting of the condition handlers. DEFAULT The local default directory. FILE_STATUS Information about a file on the remote host. HASH Current setting of hash mark displays. HOST Name of the remote host to which a connection is open. KEY Key definitions. LOCAL_DEFAULT_DIRECTORY The local default directory. MODE The Default file transfer MODE. PARAMETERS All transfer parameters: Mode, Structure, and Type. PASSIVE Current setting of passive mode transfers. PATH_PARSING Current setting for parsing of remote file paths. PROTECTION Displays the default remote file protection. QUIET Setting of QUIET mode. REMOTE_DEFAULT_DIRECTORY Current or default directory on remote system. REPLY Whether or not replies from remote server are displayed. RETAIN Setting of the retention of file version numbers. STATUS Current connection information. STRUCTURE The default structure (STRU) format. SYSTEM The current remote system type. TYPE The default file TYPE format. VERIFY Whether or not command echo is enabled.
Display information about aliases in the database. See HELP ALIAS LIST for more information.
Displays the current setting of AUTOPROMPT mode.
SHOW AUTOPROMPT
When AUTOPROMPT is enabled, you will be prompted for missing output file names.
Displays the current setting of BATCH mode.
SHOW BATCH
When batch is off, you will be prompted for retries after unsuccessful transfers.
Displays the current setting of BELL mode.
SHOW BELL
When BELL is enabled, you will be audibly notified when a file operation finishes, or if you need to reply to a question.
Displays how parameter capitalization is handled.
SHOW CASE
| #1 |
|---|
FTP> show case
No case conversion
FTP> set case lower
Converting to lower case
FTP>
|
In the example, the current CASE setting is displayed. The CASE is then changed to lower so that commands are treated differently with those wacky UNIX systems.
Displays the current setting of file type autosensing.
SHOW CHECK_TYPE
If CHECK_TYPE is enabled and if no file type has been set using SET TYPE or its synonyms (ASCII, BINARY), the MadGoat FTP client will try to automatically determine the proper type, based on the RMS attributes of the file.
Displays whether or not lower-level FTP commands are displayed.
SHOW COMMAND
Displaying lower-level FTP commands is mostly useful as a debugging tool.
Note
With displays turned on, the user's password will be displayed.For more information, see HELP SET COMMAND.
| #1 |
|---|
FTP:ftp.wku.edu> show command
Server command display is now off
FTP:ftp.wku.edu> set command
FTP:ftp.wku.edu> show command
Server command display is now off
FTP:ftp.wku.edu> quote noop
>NOOP
<200 Noop Okay.
FTP:ftp.wku.edu> set nocommand
FTP:ftp.wku.edu> show command
Server command display is now off
FTP:ftp.wku.edu> noop
<200 Noop Okay.
FTP:ftp.wku.edu>
|
This example demonstrates the effects of enabling and disabling server command display.
Displays the current setting of CONFIRM mode.
SHOW CONFIRM
When CONFIRM is enabled, you will be prompted before file transfers or other multiple wild operations.
Shows the current setting of the condition handlers.
SHOW CONDITION
For more information, see the documentation for ON ERROR, ON CONTROL_C, ON WARNING, and ON SEVERE.
| #1 |
|---|
FTP> show condition
ON Control_C Abort
ON Error Abort
ON Severe Exit
ON Warning Continue
FTP> on control_c exit
FTP> show cond
ON Control_C Exit
ON Error Abort
ON Severe Exit
ON Warning Continue
FTP>
[CTRL-C]
*CANCEL*
Operation aborted due to Control-C.
-SYSTEM-S-CONTROLC, operation completed under CTRL/C
$
|
In this example, the SHOW CONDITION command is used twice to examine the current state of the condition handlers.
Displays the current, or default, directory on the remote system. PWD is a synonym for this command.
SHOW DEFAULT
Requests information about the specified file. Note that some hosts allow wildcarding of the file-spec.
SHOW FILE_STATUS file-spec
file-spec
Specifies the name of a file at the remote site.
Requests information about the specified file in the remote site's file system. Note that some hosts allow wildcarding of the file-spec.The MadGoat FTP server gives a full listing of each file, and wild characters are allowed.
| #1 |
|---|
FTP:ftp.wku.edu> show file_status login.com
<212-
<212-LOGIN.COM;1
<212-Size: 1/3 Owner: [SIMMONS]
<212-Created: 20-APR-1993 13:27:44.86
<212-Revised: 7-MAY-1993 08:48:58.41 (2)
<212-File organization: Sequential
<212-File Attributes: Version limit: 0
<212-Record format: Variable Length, maximum 78 bytes
<212-Record Attributes: Carriage return carriage control
<212-File protection: System:RWED, Owner:RWED, Group:RE, World:
<212 End list
FTP:ftp.wku.edu>
|
In this example, the status of a single remote file is displayed.
Displays the current setting of HASH.
SHOW HASH
If HASH is enabled, a hash mark is displayed for every 1024 bytes of data that are sent or received.
| #1 |
|---|
FTP:ftp.wku.edu> show hash
Hash display is now off
FTP:ftp.wku.edu> set hash
Hash display is now on
FTP:ftp.wku.edu> put x.x
<200 Port 161,6,5,4,69,193 Okay.
<125 File status okay; about to open data connection.
################################################################
################################################################
################################################################
#############################################
<226 File transfer Okay; Closing data connection.
235655 bytes (461 blocks) in 00:00:22.34 = 10549 cps, IO=117
Sent file DJB2:[SIMMONS]X.X;1 to (Remote) x.x
FTP:ftp.wku.edu>
|
In this example, HASH is enabled and a file is transferred.
Returns the name of the currently-connected remote host.
SHOW HOST
| #1 |
|---|
FTP> connect fake
Attempting to connect to host fake
<220-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX (1-OCT-1993) ready.
<220 Connection closes if idle for 5 min.
FTP:fake> show host
Connection open to fake.bogus.com
FTP:fake>
|
In this example, SHOW HOST is used to show the name of the remote host to which a connection is established.
Displays command keys defined with the DEFINE/KEY command.
SHOW KEY [keyname]
Command Qualifiers Defaults /ALL /FULL /STATE=state /STATE=DEFAULT
keyname
The name of the key definition to be displayed. See DEFINE/KEY for valid key names.
/ALL
Displays all key definitions for the specified state. If no state if specified, the DEFAULT state is assumed.
/FULL
Displays full definitions for each key displayed. The full definition includes information about whether or not the string is echoed and terminated, and, if it sets the key state, what state is sets and whether or not the state is locked in after they key is pressed.
/STATE=state
Specifies the key state table from which key definitions are to be displayed. If no state is specified, the keys for the DEFAULT state are displayed.
| #1 |
|---|
FTP> show key/all
DEFAULT key state definitions:
PF1 = "OPEN ALPHA"
HELP = "HELP"
FTP>
|
In this example, SHOW KEY is used to display the key definitions for key state DEFAULT.
Displays the current working directory for the local system.
SHOW LOCAL_DEFAULT_DIRECTORY
This command is similar to the DCL command ``$ SHOW DEFAULT''.
Displays the current Mode function transfer parameter. The possible values for mode are COMPRESSED, BLOCK, and STREAM.
SHOW MODE
| #1 |
|---|
FTP:fake> show mode
MODE is STREAM
FTP:fake>
|
This example shows a typical response from the SHOW MODE command.
Display all three transfer parameters: Mode, Structure and Type.
SHOW PARAMETERS
| #1 |
|---|
FTP:fake> show param
TYPE is ASCII NONPRINT
MODE is STREAM
STRU is VMS
FTP:fake>
|
This example shows the typical output from the SHOW PARAMETERS command.
Displays the current setting of PASSIVE.
SHOW PASSIVE
Displays the current setting of PATH_PARSING.
SHOW PATH_PARSING
Displays the current remote default file PROTECTION.
SHOW PROTECTION
The reply differs from host to host, but generally, the information returned includes the current default file protection (permission). Many hosts do not return this information.MadGoat FTP returns this information in both UNIX format and standard VAX format. Only the 3 right most digits are used by CMU.
UNIX format consists of 4 octal digits containing the UMASK information. The digits are ``ugl|User:rwx|Groutp:rwx|Other:rwx''. Where R(4) denies read permission, W(2) denies write permission, X(1) denies execute permission. ``u''(4) sets user ID on execution, while ``g''(2) sets group ID on execution. ``l'' sets link permission to directories.
Displays the current, or default, directory on the remote system. PWD is a synonym for this command.
SHOW REMOTE_DEFAULT_DIRECTORY
| #1 |
|---|
FTP:unix> show remote
<257 "/usr1/simmons" is current directory.
FTP:unix> set remote "/etc"
<250 Directory path set to /etc.
FTP:unix> show remote
<257 "/etc" is current directory.
FTP:unix>
|
In this example, the SHOW REMOTE command to used to verify that the SET REMOTE command performed as expected.
Displays whether or not replies from the remote system are shown.
SHOW REPLY
For more information, please see the documentation on the FTP command SET REPLY.
| #1 |
|---|
FTP:fake> show reply
Server reply display is now on
FTP:fake> noop
<200 Noop Okay.
FTP:fake> set reply off
FTP:fake> show reply
Server reply display is now off
FTP:fake> noop
< Noop Okay.
FTP:fake>
|
This example shows the different output display with SET REPLY and SET NOREPLY.
Displays whether or not file version numbers are retained.
SHOW RETAIN
For more information, please see the documentation on the FTP command SET RETAIN.
Sends a command to the remote server to display the status of the FTP connection. STATUS is a synonym for SHOW STATUS.
SHOW STATUS
The reply differs from host to host, but generally, the information returned includes the current transfer parameter values.
| #1 |
|---|
FTP:fake> status
<211-fake.bogus.com MadGoat FTP server V2.6-1 for OpenVMS VAX
<211- 6-OCT-1993 15:38:53
<211-Waiting for user name
<211-Restrictions: none
<211-The current data transfer parameters are:
<211- MODE Stream
<211- STRU O VMS
<211- TYPE AN (Ascii Noprint)
<211- Data connection closed
<211 Connection closes if idle for 5 min.
FTP:fake>
|
This is a typical response from a remote host for the STATUS command.
Displays the current STRUCTURE file transfer parameter.
SHOW STRUCTURE
The possible values for STRUCTURE are FILE, PAGE, RECORD, and VMS.
| #1 |
|---|
FTP:fake> show structure
STRU is VMS
FTP:fake> set structure file
<200 Stru F Okay.
FTP:fake> show structure
STRU is FILE
FTP:fake>
|
In this example, the SHOW STRUCTURE command is used to verify that the SET STRUCTURE command behaved as expected.
Displays a summary of the file transfers.
SHOW SUMMARY
Displays statistics on the last file transfer and on all previous transfers. This consists of the number of bytes transferred, the time to transfer, and the transfer rate.
Displays the current remote SYSTEM_TYPE.
SHOW SYSTEM_TYPE
The reply differs from host to host, but generally, the information returned includes the remote operating system name and information about the remote FTP server.
Displays the current TYPE file transfer parameter.
SHOW TYPE
| #1 |
|---|
FTP:fake> show type
TYPE is ASCII NONPRINT
FTP:fake> set type image
<200 Type I ok.
FTP:fake> show type
TYPE is IMAGE
FTP:fake> set type ebcdic
Can't handle TYPE EBCDIC
FTP:fake> show type
TYPE is IMAGE
FTP:fake>
|
In this example, the SHOW TYPE command is used to verify that the SET TYPE command worked as expected.
Displays the current setting of VERIFY mode.
SHOW VERIFY
When VERIFY is enabled, commands read from a command procedure (executed with ``@'') will be echoed.
Sends a site-specific command to the remote server.
SITE remote-command
Sends a site-specific command to the remote server. The commands supported by the servers are variable, but often include commands to perform such tasks as setting file protection and spawning subprocesses.The MadGoat FTP server supports the following SITE extensions:
- CHMOD - Sets the protection on a file
- UMASK - Sets the default protection for the transfers
- BLOCKSIZE - Sets the block size for transfers
Sends a site-specific command to the remote server.
SIZE remote-filename
Sends a SIZE command to the remote server to display the size of a remote file. The file size is displayed as the number of bytes in the file.
Creates a DCL subprocess of the current process. The context of the subprocess is copied from the current process. The SPAWN command can be used to temporarily leave FTP, perform other functions, and return to the FTP session.
SPAWN [command-line]
Command Qualifiers Defaults /CARRIAGE_CONTROL /CARRIAGE_CONTROL /CLI=cli default specified in SYSUAF /INPUT=file_spec None. /KEYPAD /KEYPAD /LOGICAL_NAMES /LOGICAL_NAMES /OUTPUT=file_spec None. /PROCESS=subprocess-name None. /PROMPT=string ``$ '' /SYMBOLS /SYMBOLS /TABLE=command-table None. /WAIT /WAIT
If present, [command-line] will be executed and control returned to FTP. If absent, a DCL subprocess will be created until the DCL command LOGOUT is issued.
/CARRIAGE_CONTROL
/NOCARRIAGE_CONTROL
Determines whether carriage-return/line-feed characters are prefixed to the subprocess's prompt string. By default, SPAWN copies the current setting of the parent process./CLI=cli
Specifies the name of an alternate command language interpreter (CLI) to be used by the subprocess. If the /CLI qualifier is not specified, the CLI used will be the same as the parent process.The default is the CLI specified in SYSUAF.
The CLI you specify must be located in SYS$SYSTEM and have the file type EXE.
/INPUT=file-spec
Specifies an input file containing one or more DCL commands to be executed by the spawned subprocess. If you specify a command string with the SPAWN command and an input file with the /INPUT qualifier, the command string is processed before the input file. Once processing of the input file is complete, the subprocess is terminated./KEYPAD (D)
/NOKEYPAD
Determines whether keypad symbols and the current keypad state are copied from the parent process to the subprocess. By default, if you have established key definitions and/or states with the DEFINE/KEY and/or SET KEY commands, these settings are copied to the subprocess. Use the /NOKEYPAD qualifier if you do not want the key settings to be copied./LOGICAL_NAMES (D)
/NOLOGICAL_NAMES
Determines whether the system passes process logical names and logical name tables to the subprocess. By default, all process logical names and logical name tables are copied to the subprocess except those explicitly marked CONFINE or created in executive or kernel mode./NOTIFY (D)
/NONOTIFY
Controls whether a message is broadcast to the terminal at which you are logged in, notifying you that your subprocess has been completed or aborted. This qualifier should not be used unless you specify the /NOWAIT qualifier. /NOTIFY also cannot be specified when the SPAWN command is executed from within a non-interactive process. he default is /NONOTIFY.Note that messages broadcast as a result of specifying the /NOTIFY qualifier are considered to be DCL messages. Therefore, if SET BROADCAST=NODCL is in effect, all such notification messages will be suppressed.
/OUTPUT=file-spec
Requests that the output from the SPAWN operation be written to the specified file.Note that if both the /OUTPUT and /NOWAIT qualifiers are used interactively, and if SYS$COMMAND is specified as the /OUTPUT file specification, the output from both your parent process and your subprocesses will be displayed simultaneously at your terminal.
/PROCESS=subprocess-name
Specifies the name of the subprocess to be created. If you specify a process name that already exists, an error message is displayed. By default, if you omit the /PROCESS qualifier, a unique process name is assigned with the same base name as the parent process and a unique number. The default subprocess name format is username_n./PROMPT=string
Specifies the prompt string for DCL to use in the subprocess. By default, SPAWN copies the current prompt from the parent process.The string can consist of more than one character. All valid ASCII characters can be used in the string. In order to include spaces, lowercase letters or non-alphanumeric characters in your string, you must enclose the string in quotation marks. Otherwise, letters are automatically converted to uppercase, and leading and trailing spaces are removed.
If no string is specified, the DCL default prompt string ``$ `` is restored.
/SYMBOLS (D)
/NOSYMBOLS
Determines whether the system passes DCL global and local symbols to the subprocess. Note that the $RESTART, $SEVERITY, and $STATUS symbols are never passed to the subprocess. The default is /SYMBOLS./TABLE=table-name
Specifies the name of an alternate command table to be used by the subprocess./WAIT (D)
/NOWAIT
Controls whether the system waits until the current subprocess is completed before allowing more commands to be issued in the parent process. The /NOWAIT qualifier allows you to issue new commands while the specified subprocess is running. When you use the /NOWAIT qualifier interactively, be sure to use the /OUTPUT qualifier as well so that output from the subprocess is directed to a file rather than to your terminal. Otherwise, your terminal will be used by more than one process at the same time.By default, you must wait for the subprocess to terminate before you can issue another command.
Note that specifying the /NOWAIT qualifier will cause both input and output to be shared with the parent process. If the input device is a terminal, control characters, such as CTRL/T or CTRL/Y, will also affect all subprocesses sharing the input device. CTRL/Y, for example, will interrupt all such subprocesses.
This problem may be avoided by specifying /INPUT=NL:.
Sends a command to the remote server to display the status of the FTP connection. STATUS is a synonym for SHOW STATUS.
STATUS
Displays a remote file on the local terminal.
Note
Use the SET TYPE command, or ASCII and IMAGE, to change the file transfer TYPE.
TYPE Remote-file
| #1 |
|---|
FTP:wkuvx1> type login.com
<200 Stru F ok.
<200 Port 75.123 at Host 161.6.5.3 accepted.
<150 ASCII retrieve of BOGUS$USER:[SIMMONS]LOGIN.COM;1 started.
<226 Transfer completed. 748 (8) bytes transferred.
$ sv = 'f$verify(0)'
$ define/nolog/job decw$user_defaults bogus$user:[simmons.decw$]
$ run [.hunter]login.exe
$ exit 1 .or. f$verify(sv)
119 bytes (1 block) in 00:00:00.32 = 372 cps, IO=1
Received file login.com to (Local) SYS$OUTPUT:.;
<200 Stru O VMS ok.
FTP:wkuvx1>
|
In this example, the remote file LOGIN.COM is ``typed'' to the local terminal.
Transfers user information to the remote server. USER is a synonym for LOGIN.
USER username [account]
| Contents |