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.
/ANONYM