Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
f
ftp(1) ftp(1)
tenex
Set the FTP file transfer type to tenex.
type [type-name]
Set the FTP file transfer type to type-name.Iftype-name is unspecified, write the current type to
stdout. Ascii, binary, and tenex are the types currently supported.
umask [newmask]
Set the default umask on the remote server to newmask.Ifnewmask is omitted, the current umask is
printed.
user user-name [password][account]
Log into the server host on the current connection, which must already be open. A .netrc file in
the user’s local home directory can provide the user-name, password, and optionally the account; see
netrc(4). Otherwise ftp prompts the user for this information. The HP-UX FTP server does not
require an account. For security reasons, ftp always requires a password. It does not log into
remote accounts that do not have a password.
verbose
Toggle verbose output. If verbose output is enabled,
ftp displays responses from the server host,
and when a file transfer completes it reports statistics regarding the efficiency of the transfer.
? [command]
A synonym for the help command. Prints the help information for the specified command.
Aborting A File Transfer
To abort a file transfer, use the terminal interrupt key (usually Ctrl-C). Sending transfers are halted
immediately.
ftp halts incoming (receive) transfers by first sending a FTP protocol ABOR command to
the remote server, then discarding any further received data. The speed at which this is accomplished
depends upon the remote server’s support for
ABOR processing. If the remote server does not support the
ABOR command, an ftp> prompt does not appear until the remote server completes sending the
requested file.
The terminal interrupt key sequence is ignored while ftp awaits a reply from the remote server. A long
delay in this mode may result from the ABOR processing described above, 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 manually.
File Naming Conventions
Files specified as arguments to ftp commands are processed according to the following rules.
If the file name - is specified, ftp uses the standard input (for reading) or standard output (for writ-
ing).
If the first character of the file name is |, ftp interprets the remainder of the argument as a shell
command.
ftp forks a shell, using popen() (see popen(3S)) with the supplied argument, and reads
(writes) from standard output (standard input). If the shell command includes spaces, the argument
must be quoted, as in:
"| ls -lt".
Some useful examples of this mechanism are:
ls . "| more".
The above command lists the files in the current directory page by page.
put "| tail -20 loc_file" rem_file.
This command copies the last twenty lines of the local file "loc_file" to the remote system as "rem_file".
Otherwise, if globbing is enabled, ftp expands local file names according to the rules used by the C
shell (see csh(1)); see the glob command, below. If the ftp command expects a single local file (e.g.,
put), only the first filename generated by the globbing operation is used.
For mget commands and get commands with unspecified local file names, the local filename is named
the same as the remote filename, which may be altered by a case, ntrans,or nmap setting. The
resulting filename may then be altered if runique is on.
For mput commands and put commands with unspecified remote file names, the remote filename is
named the same as the local filename, which may be altered by a ntrans or
nmap setting. The
Section 1300 6 HP-UX Release 11i: December 2000
___
___