Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

ftp(1) OSS Shell and Utilities Reference Manual
user user [password][account]
Identies the local user as user to the remote FTP server. If password or account is not
specied and the remote server requires it, ftp prompts for it locally. If account is
required, ftp sends it to the remote server after the remote login process completes.
Note that, unless autologin is disabled by specifying -n on the command line, this pro-
cess is done automatically for the initial connection to the remote server. You also need
a $HOME/.netrc le in your home directory to issue an autologin.
verbose Toggles verbose mode. When verbose mode is on (the default), ftp displays all
responses from the remote FTP server. Additionally,
ftp displays statistics on all le
transfers when the transfers are completed.
Aborting a File Transfer
To abort a le transfer, use the Interrupt key sequence (often <Ctrl-c>). Sending transfers will be
immediately halted. Receiving transfers will be halted by sending an FTP protocol ABOR com-
mand to the remote server, and discarding any further data received. The speed at which this is
accomplished depends upon the remote servers support for ABOR processing. If the remote
server does not support the ABOR command, the prompt ftp> does not appear until the remote
server has completed sending the requested le.
The Interrupt key sequence is ignored when ftp has completed any local processing and is await-
ing a reply from the remote server. A long delay in this mode may result from the ABOR process-
ing previously described, or from unexpected behavior by the remote server, including violations
of the FTP protocol. If the delay results from unexpected remote server behavior, the local ftp
program must be killed by hand.
EXAMPLES
1. This example shows how user smith, who is logged in on host1, can log in on the remote
host host2, check the current working directory on host2 and list its contents, transfer a
le, and then end the session.
$ ftp host2
If the connection to host2 is successful, a verication message is displayed on the local
system:
Connected to host2.abc.org
220 host2 FTP server (Version 5.47 13 Mar 90 02:27) ready.
Name (host2:smith): smith
Password:
Enter your name and password when prompted by the system. A message similar to the
following is then displayed on your local system:
230 User smith logged in
ftp> _
To set the le transfer type to binary, enter the binary subcommand after the ftp>
prompt:
ftp> binary
A message similar to the following is displayed on your local system:
200 Type set to I
3164 Hewlett-Packard Company 527188-007