ftp.1 (2010 09)
f
ftp(1) ftp(1)
mode [ mode-name ]
Set the FTP file transfer mode to mode-name . The only supported mode is
stream.
modtime remote-file
Show the last modification time of remote-file.
mput local-files
Copy local-files from the local system to the remote system. The remote files have the same
name as the local files processed according to ntrans and nmap settings. If globbing is
enabled, globbing characters are expanded.
newer file-name
Get the file only if the modification time of the remote file is more recent that the file on the
current system. If the file does not exist on the current system, the remote file is considered
newer. Otherwise, this command is identical to
get.
nlist [ remote-directory ][local-file ]
Write an abbreviated listing of remote-directory to local-file .Ifremote-directory is left
unspecified, the current working directory is used. If interactive prompting is on,
ftp
prompts the user to verify that the last argument is indeed the target local file for
nlist out-
put.
nmap [ inpattern outpattern ]
Set or unset the filename mapping mechanism. If no arguments are specified, the filename
mapping mechanism is unset. If arguments are specified, remote filenames are mapped during
mput commands and put commands issued without a specified remote target filename. If
arguments are specified, local filenames are mapped during mget commands and get com-
mands issued without a specified local target filename. This command is useful when connect-
ing to a non-UNIX remote computer with different file naming conventions or practices. The
mapping follows the pattern set by inpattern and outpattern . inpattern is a template for
incoming filenames (which may have already been processed according to the ntrans and
case settings). Variable templating is accomplished by including the sequences
$1, $2, ...,
$9 in inpattern . Use \ to prevent this special treatment of the $ character. All other char-
acters are treated literally, and are used to determine the nmap inpattern variable values.
For example, given inpattern $1.$2 and the remote file name mydata.data, $1 would
have the value mydata, and $2 would have the value data. The outpattern determines the
resulting mapped filename. The sequences $1, $2, ..., $9 are replaced by any value resulting
from the inpattern template. The sequence $0 is replaced by the original filename. Addition-
ally, the sequence [seq1 ,seq2] is replaced by seq1 if seq1 is not a null string; otherwise it is
replaced by seq2. For example, the command nmap $1.$2.$3 [$1,$2].[$2,file]
would yield the output filename myfile.data for input filenames myfile.data and
myfile.data.old, myfile.file
for the input filename myfile, and
myfile.myfile for the input filename .myfile. Spaces can be included in outpattern ,as
in the example: nmap $1 | sed s/*$// > $1 Use the \ character to prevent special
treatment of the $, [, ], and , characters.
ntrans [ inchars [ outchars ]]
Set or unset the filename character translation mechanism. If no arguments are specified, the
filename character translation mechanism is unset. If arguments are specified, characters in
remote filenames are translated during mput commands and put commands issued without
a specified remote target filename. If arguments are specified, characters in local filenames
are translated during mget commands and get commands issued without a specified local
target filename. This command is useful when connecting to a non-UNIX remote computer
with different file naming conventions or practices. Characters in a filename matching a char-
acter in inchars are replaced with the corresponding character in outchars . If the character’s
position in inchars is longer than the length of outchars , the character is deleted from the file
name.
open server-host [ port-number ]
Establish a connection to server-host , using port-number (if specified). If auto-login is enabled,
ftp attempts to log into the server host.
passive Toggle passive mode of transfer. By default, the passive mode of transfer is disabled. This
command enables the server to specify the data port for the ftp transfer.
prot Toggle protection level of data connections
HP-UX 11i Version 3: September 2010 − 5 − Hewlett-Packard Company 5