FTP(1) Series 300 Only FTP(1)
NAME
ftp - file transfer program
SYNOPSIS
ftp [ -g ] [ -i ] [ -n ] [ -v ] [ server-host ]
HP-UX COMPATIBILITY
Level: HP-UX/NON-STANDARD
Origin: UCB
Remarks: Implemented on the Series 300 only.
DESCRIPTION
Ftp is a user interface to a subset of the ARPANET-standard
File Transfer Protocol. Ftp transfers files over a network
connection between the local ``client'' host and a remote
``server'' host. Ftp runs on the client host.
The ftp command supports the following options:
-g Disable file name ``globbing''; see the glob command,
below. By default, when this option is not specified,
globbing is enabled.
-i Disable interactive prompting during multiple-file
transfers; see the prompt command, below. By default,
when this option is not specified, prompting is
enabled.
-n Disable ``auto-login''; see the open command, below.
By default, when this option is not specified, auto-
login is enabled.
-v Enable verbose output; see the verbose command, below.
By default, when this option is not specified, ftp
displays verbose output only if stdin is associated
with a terminal.
The name of the server host with which ftp communicates may
be specified on the command line. If the server host is
specified, ftp immediately opens a connection to the server
host; see the open command, below. Otherwise, ftp awaits
commands from the user. The server host name can be either
the official name or an alias as listed in /etc/hosts; see
hosts(5)).
Ftp processes file name arguments as follows: If the file
name `-' is specified, ftp uses stdin (for reading) or
stdout (for writing). Otherwise, if globbing is enabled,
ftp expands local file names according to the rules used by
csh(1); see the glob command, below.
Hewlett-Packard - 1 - (printed 7/16/86)
FTP(1) Series 300 Only FTP(1)
The ARPANET File Transfer Protocol specifies many parameters
which affect file transfers. Ftp supports the ascii,
binary, and tenex File Transfer Protocol types. Ascii is
the default FTP type. Ftp supports only the default values
for the remaining file transfer parameters: mode, which
defaults to stream; form, which defaults to non-print; and
struct, which defaults to file.
FTP Commands
Ftp supports the following commands. Command arguments with
embedded spaces must be enclosed in quotes (e.g., "argument
with embedded spaces").
! [ command ]
Invoke a shell on the local host. The SHELL
program environment variable specifies which shell
program to invoke (e.g., SHELL="/bin/sh", or
SHELL="/bin/csh"). Ftp invokes "/bin/sh" if SHELL
is undefined. If command is specified then the
shell executes it and returns to ftp. Otherwise
the shell accepts commands from stdin. When the
shell terminates it returns to ftp.
append local-file [ remote-file ]
Transfer local-file to the end of remote-file. If
remote-file is not specified, ftp assigns the
local-file name to remote-file. Ftp creates
remote-file if it does not already exist.
ascii Set the FTP file transfer type to ascii. This is
the default type.
bell Sound a bell after each file transfer completes.
binary Set the FTP file transfer type to binary.
bye Close the connection to the server host (if one
was open), and exit ftp.
cd remote-directory
Set the working directory on the server host to
remote-directory.
close Terminate the connection to the server host.
delete remote-file
Delete remote-file.
dir [ remote-directory [ local-file ] ]
Write a remote-directory listing to stdout and,
optionally, to local-file. If neither remote-
directory nor local-file is specified, list the
Hewlett-Packard - 2 - (printed 7/16/86)
FTP(1) Series 300 Only FTP(1)
remote working directory to stdout.
form format
Set the FTP file transfer form to format. The
only supported form is non-print; that is, ``form
non-print'' is currently the only acceptable use
of this command.
get remote-file [ local-file ]
Transfer remote-file to local-file. If local-file
is unspecified then ftp assigns the remote-file
name to local-file.
hash Toggle hash-sign (``#'') printing for each data
block transferred. The size of a data block is
1024 bytes.
glob Toggle file name globbing. When file name
globbing is enabled, ftp expands csh(1)
metacharacters in local file and directory names.
These characters include ``*?[]~{}''. The server
host expands remote file and directory names.
When globbing is disabled, ftp and the server host
do not expand metacharacters.
help [ ftp-command ]
Print an informative message about an FTP command
called ftp-command. If ftp-command is
unspecified, print a list of all ftp commands.
lcd [ local-directory ]
Set the local working directory to local-
directory. If local-directory is unspecified, set
the local working directory to the user's local
home directory.
ls [ remote-directory [ local-file ] ]
Write an abbreviated listing of remote-directory
to stdout and, optionally, to local-file. If
neither remote-directory nor local-file is
specified, list the remote working directory.
mdelete remote-files
Delete remote-files.
mdir remote-files local-file
Write a listing of remote-files to local-file.
mget remote-files
Transfer remote-files to the local working
directory.
Hewlett-Packard - 3 - (printed 7/16/86)
FTP(1) Series 300 Only FTP(1)
mkdir remote-directory
Create remote-directory.
mls remote-files local-file
Write an abbreviated listing of remote-files to
local-file.
mode [ mode-name ]
Set the FTP file transfer mode to mode-name. The
only supported mode is stream.
mput local-files
Transfer local-files from the local working
directory to the remote working directory. The
remote files have the same name as the local
files.
open server-host [ port-number ]
Establish a connection to server-host, using
port-number if it is specified. If auto-login is
enabled, ftp also attempts to log in to the server
host.
prompt Toggle interactive prompting. Interactive
prompting occurs during multiple-file transfers to
allow the user to selectively transfer files. If
interactive prompting is disabled, then ftp
transfers all specified files.
put local-file [ remote-file ]
Transfer local-file to remote-file. If remote-
file is unspecified then ftp assigns the local-
file name to remote-file.
pwd Write the name of the remote working directory to
stdout.
quit A synonym for the bye command.
quote arguments
Send arguments, verbatim, to the server host. See
ftpd(1M).
recv remote-file [ local-file ]
A synonym for the get command.
remotehelp [ command-name ]
Request help from the server host. If command-
name is specified, supply it to the server as
well. See ftpd(1M).
rename [ remote-from ] [ remote-to ]
Hewlett-Packard - 4 - (printed 7/16/86)
FTP(1) Series 300 Only FTP(1)
Rename remote-from, which may be either a file or
a directory, to remote-to.
rmdir remote-directory
Delete remote-directory. Remote-directory must be
empty.
send local-file [ remote-file ]
A synonym for the put command.
sendport Toggle the use of PORT commands. By default, ftp
attempts to use a PORT command when establishing a
connection for each data transfer. If the PORT
command fails, ftp uses the default data port.
When the use of PORT commands is disabled, ftp
makes no attempt to use PORT commands for each
data transfer. This is useful for certain FTP
implementations which ignore PORT commands, but
(incorrectly) indicate that they've been accepted.
See ftpd(1M).
status Write the current status of ftp to stdout.
struct [ struct-name ]
Set the FTP file transfer struct to struct-name.
The only supported struct is file.
tenex Set the FTP file transfer type to tenex.
type [ type-name ]
Set the FTP file transfer type to type-name. If
type-name is unspecified, write the current type
to stdout.
user user-name [ password ] [ account ]
Login to the server host on the current connection
(which must already be open). The HP-UX FTP
server ( ftpd(1M)) accepts only one login per
connection. To change to a different remote user
account, you must close the current connection and
open a new one. A .netrc file in the user's local
home directory may provide the user-name,
password, and optionally the account; see
netrc(5). Otherwise ftp prompts the user for this
information. HP-UX does not require an account.
For reasons of system security ftp always requires
a password. It will not log in to remote accounts
which don't have one.
verbose Toggle verbose output. When verbose output is
enabled, ftp displays all responses from the
server host. And, when a file transfer completes,
Hewlett-Packard - 5 - (printed 7/16/86)
FTP(1) Series 300 Only FTP(1)
ftp reports statistics regarding the efficiency of
the transfer.
? [ command ]
A synonym for the help command.
SEE ALSO
rcp(1), ftpd(1M), netrc(5), ftpusers(5), hosts(5).
Hewlett-Packard - 6 - (printed 7/16/86)