Mapping and translating file names, Sending data, Sending copies of local files – HP Integrity NonStop H-Series User Manual

Page 46

Advertising
background image

Verbose: on; Bell: off; Prompting: on; Globbing: on
.
.

When glob is on, a wild-card name in an mput, mget, or mdelete command is expanded to a list
of file names. For the mget and mdelete commands, the remote system expands the name and
creates the list. For the mput command, the local system performs this task.

The rules for using wild-card characters and examples of their use are given in the description of
the glob command in the

“FTP Command Reference” (page 48)

.

Mapping and Translating File Names

Because the local system and the remote system usually have different file-naming conventions, FTP
provides commands you can use to define file-name mapping and translating schemes. For example,
when you copy a file to a remote system and do not specify a name for the file, FTP uses the local
file name after applying the current translating and mapping schemes you have defined.

The commands that define the mapping scheme and the order in which these commands are
applied to a name are: case, ntrans, and nmap. If you want a file name used without changes,
you can turn case off (the default) and reset ntrans and nmap by entering these commands without
any parameters.

For descriptions of these commands, see the

“FTP Command Reference” (page 48)

.

The following example illustrates the effect of combining a mapping scheme with a translating
scheme:

ftp> ntrans +- pm
ftp> nmap $1/$2 $2
ftp> mget maindir/x*

When you issue the mget command, the remote system expands the wild-card name to all files in
the directory named maindir which begin with the letter x. The asterisk indicates that the letter x
can be followed by one or more characters of any type. FTP creates the local names for these files
by first performing the translation and then the mapping. A plus sign (+) is translated to the letter
p and a minus sign (-) to the letter m. The first slash character and the part of the name preceding
it are deleted when the name is mapped, as in the following example:

Remote File Name Translated Name Mapped Name

maindir/xyz+abc maindir/xyzpabc xyzpabc

| | |
$1 $2 $2

For details on filename mapping and translation, see the nmap and ntrans commands in the

“FTP

Command Reference” (page 48)

.

The following mapping scheme maps UNIX names to Guardian names:

ftp> nmap /usr/tmp/$1 $vol1.subvol.$1

In this example, a file named /usr/tmp/abc on a UNIX system is mapped to a file named
$vol1.subvol.abc

on a Guardian system.

Sending Data

FTP allows you to send copies of one or more files to a remote system or send specific arguments
to the system.

Sending Copies of Local Files

You can send a copy of a local file to a remote system by using either the put or send command,
or you can send copies of multiple files by using the mput command.

46

FTP—Transferring Files

Advertising
This manual is related to the following products: