Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (d - f) ftp(1)
NAME
ftp - Transfers les between a local OSS le system and a remote host
SYNOPSIS
ftp [-dginv][host]
The ftp command is the interface to the File Transfer Protocol (FTP). This command uses OSS
FTP to transfer les between the local host and a remote host or between two remote hosts. OSS
FTP only runs in an OSS shell environment. The Guardian FTP client runs in a Guardian environ-
ment.
FLAGS
The following ags can be entered on the shell command line. (The ftp command equivalents can
also be entered at the ftp> prompt.)
-d Enables debugging by turning on the logging feature. See the debug subcommand.
-g Disables the expansion of metacharacters in
lenames. Interpreting metacharacters may
be referred to as expanding (sometimes called globbing)alename. See the glob sub-
command.
-i Disables interactive prompting during multiple le transfers. See the prompt, mget,
mput, and mdelete subcommands for descriptions of prompting during multiple le
transfers.
-n Prevents an automatic login on the initial connection. Otherwise, ftp searches for a
$HOME/.netrc entry that describes the login and initialization process for the remote
host. See the user subcommand.
-v Displays all the responses from the remote server and provides data transfer statistics.
This is the default display mode when the output of the ftp command is to a device, such
as the console or a display. However, if output is redirected, such as through a pipe or to
a le, or if the ftp command is started by a daemon, such as the cron daemon, verbose
mode is not in effect unless the -v ag or the verbose subcommand is used. See the ver-
bose subcommand.
DESCRIPTION
The OSS FTP client transfers data between a local host with an OSS le system and a remote host
that can use a dissimilar le system. Therefore, although the protocol provides a lot of exibility
for transferring data, it does not attempt to preserve le attributes that are specic to a particular
le system (for example, the protection mode or modication times of a le). Additionally, the
FTP protocol makes few assumptions about the overall structure of a le system and does not pro-
vide or allow such things as recursively copying subdirectories.
The ftp command provides subcommands for tasks such as listing remote directories, changing the
current local and remote directory, transferring multiple les in a single request, creating and
removing directories, and escaping to the local shell to perform shell commands. The ftp com-
mand also provides for security by sending passwords to the remote host and permits automatic
login, le transfer, and logoff.
If you execute ftp and do not specify a hostname, ftp immediately displays the ftp> prompt and
waits for an ftp subcommand. To connect to a remote host, you then execute the open subcom-
mand. When the ftp command connects to the remote host, ftp then prompts for the username and
password before displaying the ftp> prompt again. ftp fails if no password is dened at the
remote host for the specied username.
If you do specify the name of a remote host, ftp immediately tries to establish a connection to the
specied host. If ftp connects successfully, ftp searches for a local $HOME/.netrc le in your
current directory or home directory. If the le exists, ftp searches the le for an entry that initiates
527188-003 Hewlett-Packard Company 3155