f

ftp(1)

 

 

 

 

 

 

 

 

 

 

ftp(1)

commands and put commands issued without a speci®ed remote target ®lename. If arguments are

speci®ed, local ®lenames are mapped during

mget commands and get commands issued without a

speci®ed local target ®lename. This command is useful when connecting to a non-UNIX remote com-

puter with different ®le naming conventions or practices. The mapping follows the pattern set by

inpattern and outpattern. inpattern is a template for incoming ®lenames (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 characters are treated literally, and are used to determine the

nmap

inpattern

variable values.

For

example,

given inpattern

$1.$2 and

the remote ®le

name

mydata.data ,

$1 would have the value mydata, and

$2 would have the value data. The out-

pattern determines the resulting mapped ®lename. The sequences $1, $2,

..., $9 are replaced by

any value

resulting from

the inpattern template. The

sequence $0 is replaced by the original

®lename. Additionally, the sequence [seq1,seq2] is replaced by seq1 if seq1 is not a null string; oth-

erwise

it

is

replaced

by

seq2.

For

example,

the command

nmap $1.$2.$3

[$1,$2].[$2,file] would

yield

the

output ®lename

myfile.data for input ®lenames

myfile.data and myfile.data.old,

myfile.file for the input ®lename myfile, and

myfile.myfile for the input ®lename .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 ®lename character translation mechanism. If no arguments are speci®ed, the ®lename character translation mechanism is unset. If arguments are speci®ed, characters in remote ®lenames are translated during mput commands and put commands issued without a speci®ed remote target ®lename. If arguments are speci®ed, characters in local ®lenames are translated during mget commands and get commands issued without a speci®ed local target ®lename. This command is useful when connecting to a non-UNIX remote computer with different ®le naming conventions or practices. Characters in a ®lename matching a character 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 ®le name.

open server-host [ port-number ]

Establish a connection to server-host, using port-number(if speci®ed). If auto-loginis 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.

prompt

Toggle interactive prompting. By default, ftp prompts the user for a yes or no response for each output ®le during multiple-®le commands. If interactive prompting is disabled, ftp performs the command for all speci®ed ®les.

proxy ftp-command

Execute an ftp command on a secondary control connection. This command allows simultaneous connection to two remote FTP servers for transferring ®les between the two servers. The ®rst proxy command should be an open, to establish the secondary control connection. Enter the command proxy ? to see other FTP commands executable on the secondary connection. The following commands behave differently when prefaced by proxy: open does not de®ne new macros during the auto-login process, close does not erase existing macro de®nitions, get and mget transfer ®les from the host on the primary control connection to the host on the secondary control connection, and put, mput, and append transfer ®les from the host on the secondary control connection to the host on the primary control connection. Third party ®le transfers depend upon support of the FTP protocol PASV command by the server on the secondary control connection.

put local-file [ remote-file ]

Copy local-®leto remote-®le. If remote-®leis unspeci®ed, ftp assigns the local-®lename, processed according to any ntrans or nmap settings, to the remote-®lename.

pwd Write the name of the remote working directory to stdout.

quit

A synonym for bye.

 

 

quote arguments

 

 

Send arguments, verbatim, to the server host. See ftpd(1M).

 

Section 1298

− 4 −

HP-UX Release 11i: December 2000