Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
ftp(1) OSS Shell and Utilities Reference Manual
NAME
ftp - Transfers files between a local OSS file 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 files 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 flags 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
filenames. Interpreting metacharacters may
be referred to as expanding (sometimes called globbing)afilename. See the glob sub-
command.
-i Disables interactive prompting during multiple file transfers. See the prompt, mget,
mput, and mdelete subcommands for descriptions of prompting during multiple file
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 file, or if the ftp command is started by a daemon, such as the cron daemon, verbose
mode is not in effect unless the -v flag 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 file system and a remote host
that can use a dissimilar file system. Therefore, although the protocol provides a lot of flexibility
for transferring data, it does not attempt to preserve file attributes that are specific to a particular
file system (for example, the protection mode or modification times of a file). Additionally, the
FTP protocol makes few assumptions about the overall structure of a file 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 files 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, file 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 defined at the
remote host for the specified username.
If you do specify the name of a remote host, ftp immediately tries to establish a connection to the
specified host. If ftp connects successfully, ftp searches for a local $HOME/.netrc file in your
current directory or home directory. If the file exists, ftp searches the file for an entry that initiates
3−156 Hewlett-Packard Company 527188-007