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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

USTAR format. The extended USTAR format allows more information to be stored<br />

and supports longer pathnames. There is also a non-portable <strong>OS</strong>390 format (–S<br />

option) which also allows storing of additional file attributes and longer pathnames.<br />

A tar archive, in either format, consists of one or more blocks, which are used to<br />

represent member files. Each block is 512 bytes long; you can use the –b option<br />

with tar to indicate how many of these blocks are read or written (or both) at once.<br />

Each member file consists of a header block, followed by zero or more blocks<br />

containing the file contents. The end of the archive is indicated by two blocks filled<br />

with binary zeros. Unused space in the header is left as binary zeros.<br />

The header information in a block is stored in a printable ASCII form, so that tar<br />

archives are easily ported to different environments. If the contents of the files on<br />

the archive are all ASCII, the entire archive is ASCII.<br />

Table 42 shows the <strong>UNIX</strong> format of the header block for a file:<br />

Table 42. Archive File: <strong>UNIX</strong>-Compatible Format<br />

Field Width Field Name Meaning<br />

100 name Name of file<br />

8 mode File mode<br />

8 uid Owner user ID<br />

8 gid Owner group ID<br />

12 size Length of file in bytes<br />

12 mtime Modify time of file<br />

8 chksum Checksum for header<br />

1 link Indicator for links<br />

100 linkname Name of linked file<br />

v A directory is indicated by a trailing /(slash) in its name.<br />

v The link field is: 1 for a linked file, 2 for a symbolic link, 0 otherwise.<br />

tar determines that the USTAR format is being used by the presence of the<br />

null-terminated string USTAR in the magic field. All fields before the magic field<br />

correspond to those of the <strong>UNIX</strong> format, except that typeflag replaces the link field.<br />

Table 43. Archive File: USTAR Format<br />

Field Width Field Name Meaning<br />

100 name Name of file<br />

8 mode File mode<br />

8 uid Owner user ID<br />

8 gid Owner group ID<br />

12 size Length of file in bytes<br />

12 mtime Modify time of file<br />

8 chksum Checksum for header<br />

1 typeflag Type of file<br />

100 linkname Name of linked file<br />

6 magic USTAR indicator<br />

2 version USTAR version<br />

32 uname Owner user name<br />

32 gname Owner group name<br />

8 devmajor Device major number<br />

8 devminor Device minor number<br />

155 prefix Prefix for filename<br />

tar<br />

Appendix H. File Formats 923

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

Saved successfully!

Ooh no, something went wrong!