Go to the previous, next section.

Including a Label in the Archive

(This message will disappear, once this node revised.)

FIXME: Should the arg to --label be a quoted string??  no - ringo
To avoid problems caused by misplaced paper labels on the archive media, you can include a label entry--an archive member which contains the name of the archive--in the archive itself. Use the `--label=archive-label' (`-V archive-label') option in conjunction with the `--create' (`-c') operation to include a label entry in the archive as it is being created.

If you create an archive using both `--label=archive-label' (`-V archive-label') and `--multi-volume' (`-M'), each volume of the archive will have an archive label of the form `archive-label Volume n', where n is 1 for the first volume, 2 for the next, and so on.

FIXME: xref Multi-Volume Archives
, for information on creating multiple volume archives.

If you extract an archive using `--label=archive-label' (`-V archive-label'), tar will print an error if the archive label doesn't match the archive-label specified, and will then not extract the archive. You can include a regular expression in archive-label, in this case only.

FIXME: why is a reg. exp. useful here?  (to limit extraction to a
FIXME: specific group?  ie for multi-volume???

To find out an archive's label entry (or to find out if an archive has a label at all), use `tar --list --verbose'. tar will print the label first, and then print archive member information, as in the example below:

% tar --verbose --list --file=iamanarchive
V--------- 0/0        0 Mar  7 12:01 1992 iamalabel--Volume Header--
-rw-rw-rw- ringo/user 40 May 21 13:30 1990 iamafilename

`--label=archive-label'
`-V archive-label'
Includes an archive-label at the beginning of the archive when the archive is being created, when used in conjunction with the `--create' (`-c') option. Checks to make sure the archive label matches the one specified (when used in conjunction with the `--extract' (`-x') option.
FIXME: was --volume

Go to the previous, next section.