Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

ftp(1) OSS Shell and Utilities Reference Manual
the login process and command macro denitions for the remote host. If the $HOME/.netrc le
or autologin entry does not exist, ftp prompts you for a username and password. This occurs
whether or not the hostname is entered on the command line.
If ftp nds a $HOME/.netrc autologin entry for the specied host, ftp attempts to use the informa-
tion in that entry to automatically log into the remote host. The
ftp command also loads any com-
mand macros dened in the entry. In some cases (for example, when the required password is not
listed in an autologin entry), ftp prompts for the password before displaying the ftp> prompt.
Once ftp completes the autologin process, ftp executes the init macro if the macro is dened in the
autologin entry. If the init macro does not exist or does not contain a quit or bye command, ftp
then displays the prompt and waits for a subcommand.
The remote username that you specify either at the prompt or in a $HOME/.netrc le must exist
and have a password dened at the remote host, or ftp fails.
The ftp command interpreter, which handles all commands entered at the ftp> prompt, provides
facilities that are not available with most le transfer programs, such as: the handling of lename
arguments to ftp commands, the ability to collect a group of commands into a single command
macro, and the ability to load macros from a $HOME/.netrc le. These facilities are designed to
allow simplifying repeated tasks and to allow using ftp in unattended mode. The ftp command |
interpreter does not support entry of commands (including the arguments) longer than 198 charac- |
ters at the ftp> prompt.
The command interpreter handles lename arguments according to the following rules:
If a - (dash) is specied for the argument, standard input is used for read operations and
standard output is used for write operations.
Failing the preceding check, if globbing is enabled, local lenames are expanded accord-
ing to the rules used in csh; (see the glob subcommand). If the ftp command expects a
single local le (for example, put), the pattern-matching characters following the put
command are interpreted as a le name.
For get and mget subcommands with unspecied local lenames, the local lename is the
same as the remote lename, which may be altered by a case, ntrans,ornmap setting.
The resulting lename can then be altered if runique is on.
For mput commands and put commands with unspecied remote lenames, the remote
lename is the same as the local lename, which can be altered by a ntrans or nmap set-
ting. The resulting lename can then be altered by the remote server if sunique is on.
If the rst argument is /G, the Guardian le space is accessed. The "G" must be capitalized
(upper case) to access Guardian le space.
To end an ftp session when you are running interactively, use the bye or quit subcommand or the
End-of-File key sequence at the ftp> prompt. To end a le transfer before it has been completed,
use the Interrupt key sequence. The default Interrupt key sequence is <Ctrl-c>.
The stty command can be used to redene this key sequence. Sending transfers (those from the
local host to the remote host) are normally halted immediately. Receiving transfers are halted by
sending an FTP ABOR instruction to the remote FTP server and discarding all incoming le
transfer packets until the remote server stops sending them.
If the remote server does not support the ABOR instruction, the ftp> prompt will not appear until
the remote server has sent all of the requested les. Additionally, if the remote server does some-
thing unexpected, the local ftp process may need to be ended manually.
3156 Hewlett-Packard Company 527188-004