Go to the previous, next section.

Options to Help Read Archives

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

FIXME: each option wants its own node.  summary after menu

Normally, tar will request data in full block increments from an archive storage device. If the device cannot return a full block, tar will report an error. However, some devices do not always return full blocks, or do not require the last block of an archive to be padded out to the next block boundary. To keep reading until you obtain a full block, or to accept an incomplete block if it contains an end-of-archive marker, specify the `--read-full-blocks' (`-B') option in conjunction with the `--extract' (`-x') or `--list' (`-t') operations.

FIXME: xref Listing Contents
.

The `--read-full-blocks' (`-B') option is turned on by default when tar reads an archive from standard input, or from a remote machine. This is because on BSD Unix systems, attempting to read a pipe returns however much happens to be in the pipe, even if it is less than was requested. If this option were not enabled, tar would fail as soon as it read an incomplete block from the pipe.

If you're not sure of the blocking factor of an archive, you can read the archive by specifying `--read-full-blocks' (`-B') and `--block-size=512-size' (`-b 512-size'), using a blocking factor larger than what the archive uses. This lets you avoid having to determine the blocking factor of an archive.

FIXME: xref Blocking Factor
.

`--read-full-blocks'
`-B'
Use in conjunction with `--extract' (`-x') to read an archive which contains incomplete blocks, or one which has a blocking factor less than the one specified.

Normally tar stops reading when it encounters a block of zeros between file entries (which usually indicates the end of the archive). `--ignore-zeros' (`-i') allows tar to completely read an archive which contains a block of zeros before the end (i.e. a damaged archive, or one which was created by cat-ing several archives together).

The `--ignore-zeros' (`-i') option is turned off by default because many versions of tar write garbage after the end-of-archive entry, since that part of the media is never supposed to be read. GNU tar does not write after the end of an archive, but seeks to maintain compatablity among archiving utilities.

`--ignore-zeros'
`-i'
To ignore blocks of zeros (ie. end-of-archive entries) which may be encountered while reading an archive. Use in conjunction with `--extract' (`-x') or `--list' (`-t').

If you are using a machine with a small amount of memory, and you need to process large list of file names, you can reduce the amount of space tar needs to process the list. To do so, specify the `--same-order' (`-s') option and provide an ordered list of file names. This option tells tar that the name arguments provided on the command line, or read from a file using the `--files-from=file-of-names' (`-T file-of-names') option, are listed in the same order as the files in the archive.

You can create a file containing an ordered list of files in the archive by storing the output produced by `tar --list --file=archive-name'.

FIXME: xref Listing Contents
, for information on the `--list' (`-t') operation.

This option is probably never needed on modern computer systems.

`--same-order'
`--preserve-order'
`-s'
To process large lists of file names on machines with small amounts of memory. Use in conjunction with `--compare' (`-d'), `--list' (`-t') or `--extract' (`-x').

FIXME: we don't need/want --preserve to exist any more

Go to the previous, next section.