Copying a directory hierarchy to another directory, Copying a file hierarchy to tape – HP NonStop G-Series User Manual

Page 152

Advertising
background image

behave the same as UNIX tape devices. The interaction between the tape process and tape device
is transparent to the pax user.

If the -W wait flag appears, pax first issues a mount request to the Guardian tape process and
then prints the following tape mount message to the terminal (/dev/tty):

Device not ready or tape is not mounted?

If the -W wait flag does not appear, pax is in a wait state until an unlabeled tape has been
mounted on the tape drive correctly. Use the Guardian utility MEDIACOM to mount the tape. These
two utilities can be invoked from the TACL environment or from the OSS shell through the gtacl
command.

If errors that are related to the device or the mounted tape occur during the tape mount process,
diagnostic messages are issued. You have a choice of either correcting the errors and remounting
the tape or canceling the tape mount request through MEDIACOM.

Following are examples of pax usage.

Copying a Directory Hierarchy to Another Directory

To copy a directory hierarchy to another directory, enter the following:

$ mkdir newdir

$ pax -rw olddir newdir

The -r flag reads an archive file from the standard input file.

The -w flag writes files to the standard output file in the specified archive format.

Note that if the target directory does not exist, you must create it.

Copying a File Hierarchy to Tape

To copy the file hierarchy of the current directory to the tape mounted on Guardian tape device
$TAPE, using the blocking factor for 5120 bytes, enter the following:

$ pax -wv -f /G/tape -b 10b

The -w flag writes files to the standard output file in the specified archive format.

The -v flag in list mode produces a verbose table of contents. Otherwise, it writes archive member
pathnames to the standard error file.

The -f /G/tape flag specifies the pathname of the input or output archive, overriding the default
standard input file (in list or read modes) or standard output file (in write mode). Guardian tape
devices can be specified with the /G naming convention. Guardian system procedure calls are
used to interface with the Guardian tape process. If the -a flag is also specified and disk archive
medium is used, files are appended to the end of the archive.

For the -b 10b flag, an archive is recorded as a series of fixed-size blocks. To make physical
I/O more efficient, the specified blocksize should be limited to 32256 bytes for disk archives and
28672 bytes for tape archives. Blocking is automatically determined on input.

The blocksize can be specified as a series of digits (0 through 9) followed by an option letter b or
k. If b is used, the blocksize value is multiplied by 512. If k is used, the blocksize value is multiplied
by 1024. For example, 10b translates to a blocksize value of 5120 bytes (10 * 512).

The default blocksize for cpio archive format is 10b (5120 bytes). The last group of blocks is
always at the full size. The default blocksize for ustar archive format is 10k (10240 bytes). The
blocksize should be specified as a multiple of 512 bytes.

Note that if the current directory is the root directory, the /E and /G directories are included in
the archive. You can prevent the /E and /G directories from being archived by specifying the -W
NOG

and -W NOE flags, respectively. For example, the following command archives all OSS files

on the local node only to a file named paxfile:

pax -wvf paxfile -W NOG -W NOE /

152

Transferring and Archiving Files

Advertising
This manual is related to the following products: