16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

cpio<br />

Patterns are the same as those used by filename generation (see sh).<br />

When you do not specify a pattern argument, the default pattern * is used;<br />

as a result, cpio extracts all files.<br />

–o Writes a new archive to the standard output (stdout), using the list of files<br />

read from stdin. Such a list might be produced by the ls or find<br />

commands. For example:<br />

ls . | cpio –o >arch<br />

uses ls to list the files of the working directory and then pipes this list as<br />

input to cpio. The resulting archive contains the contents of all the files,<br />

and is written to arch.<br />

–p Is shorthand for:<br />

cpio –o | (cd directory; cpio –i)<br />

where cpio –i is performed in the given directory. You can use this option to<br />

copy entire file trees.<br />

Consult the syntax lines to determine which of the following additional options can<br />

be applied with a particular selector option:<br />

–a Resets the access time (of each file accessed for copying to the archive) to<br />

what it was before the copy took place.<br />

–B Uses buffers of 5120 bytes for input and output rather than the default<br />

512-byte buffers.<br />

–b Causes 16-bit words to be swapped within each longword and bytes to be<br />

swapped within each 16-bit word of each extracted file. This facilitates the<br />

transfer of information between different processor architectures. This is<br />

equivalent to specifying both the –s and –S options.<br />

–C blocksize<br />

Sets the buffer size to a specified blocksize, rather than the default<br />

512-byte buffers.<br />

–c Reads and writes header information in ASCII form. Normally, cpio writes<br />

the header information in a compact binary format. This option produces an<br />

archive more amenable to transfer through nonbinary streams (such as<br />

some data communication links) and is highly recommended for those<br />

moving data between different processors.<br />

–d Forces the creation of necessary intermediate directories when they do not<br />

already exist.<br />

–f Inverts the sense of pattern matching. More precisely, cpio extracts a file<br />

from the archive if and only if it does not match any of the pattern<br />

arguments.<br />

–I file Causes input to be read from the specified file, rather than from stdin.<br />

–l Gives permission to create a link to a file rather than making a separate<br />

copy.<br />

–m Resets the modification time of an output file to the modification time of the<br />

source file. Normally, when cpio copies data into a file, it sets the<br />

modification time of the file to the time at which the file is written. This<br />

option has no effect on directories.<br />

–O file Causes output to be written to the specified file, rather than to stdout.<br />

166 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!