ftp.1 (2010 09)
f
ftp(1) ftp(1)
environment PORT/PASV commands are used.
form format
Set the file transfer form to format . The only supported format is
non-print
get remote-file [ local-file ]
Copy remote-file to local-file.Iflocal-file is unspecified,
ftp uses the specified remote-file
name as the local-file name, subject to alteration by the current case , ntrans , and nmap set-
tings.
glob Toggle file name globbing. When file name globbing is enabled,
ftp expands csh(1) meta-
characters in file and directory names. These characters are
*, ?, [, ], ˜, {, and }. The
server host expands remote file and directory names. Globbing metacharacters are always
expanded for the
ls and dir commands. If globbing is enabled, metacharacters are also
expanded for the multiple-file commands
mdelete, mdir, mget, mls, and mput.
hash Toggle printing of a hash-sign (
#) for each 1024 bytes transferred. Note that the use of this
feature may cause performance degradation.
help [ command ]
Print an informative message about the
ftp command called ftp-command .Ifftp-command
is unspecified, print a list of all
ftp commands.
idle [ seconds ]
Set the inactivity timer on the remote server to seconds seconds. If seconds is omitted, ftp
prints the current inactivity timer.
lcd [ local-directory ]
Set the local working directory to local-directory.Iflocal-directory is unspecified, set the local
working directory to the user’s local home directory.
ls [ remote-directory ][local-file ]
Write a listing of remote-directory to local-file . The listing includes any system-dependent
information that the server chooses to include. For example, most UNIX systems, including
HP-UX, produce output from the command
ls -l (see also nlist). If neither remote-
directory nor local-file is specified, list the remote working directory. If globbing is enabled,
globbing metacharacters are expanded.
macdef macro-name
Define a macro. Subsequent lines are stored as the macro macro-name ; an empty input line
terminates macro input mode. There is a limit of 16 macros and 4096 total characters in all
defined macros. Macros remain defined until a close command is executed. The macro pro-
cessor interprets $ and \ as special characters. A $ followed by a number (or numbers) is
replaced by the corresponding argument on the macro invocation command line. A
$ followed
by an i signals to the macro processor that the executing macro is to be looped. On the first
pass,
$i is replaced by the first argument on the macro invocation command line; on the second
pass it is replaced by the second argument, and so on. A \ followed by any character is
replaced by that character. Use the \ to prevent special treatment of the $.
mdelete [ remote-files ]
Delete remote-files. If globbing is enabled, globbing metacharacters are expanded.
mdir remote-files local-file
Write a listing of remote-files to local-file. If globbing is enabled, globbing metacharacters are
expanded. If interactive prompting is on, ftp prompts the user to verify that the last argu-
ment is indeed the target local file for mdir output.
mget remote-files
Copy remote-files to the local system. If globbing is enabled, globbing metacharacters are
expanded. The resulting local file names are processed according to case , ntrans , and nmap
settings.
mkdir directory-name
Create remote directory-name.
mls remote-files local-file
Write an abbreviated listing of remote-files to local-file. If globbing is enabled, globbing meta-
characters are expanded. If interactive prompting is on, ftp prompts the user to verify that
the last argument is indeed the target local file for mls output.
4 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: September 2010