Go to the previous, next section.

Listing Archive Members

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

The `--list' (`-t') option will list the names of members of the archive. Name the members to be listed on the command line (to modify the way these names are interpreted,

FIXME: pxref Specifying Names to
tar
). If you name no members, then `--list' (`-t') will list the names of all the members of the archive.

To see more than just the names of the members, use the `--verbose' (`-v') option to cause tar to print out a listing similar to that of `ls -l'.

Listing the Contents of an Archive

`--list' (`-t') prints a list of the file names of the archive members on the standard output. If you specify file name arguments on the command line (or using the `--files-from=file-of-names' (`-T file-of-names') option,

FIXME: pxref File Name Lists
), only the files you specify will be listed, and only if they exist in the archive. Files not specified will be ignored, unless they are under a specific directory.

If you include the `--verbose' (`-v') option, tar prints an `ls -l' type listing for the archive.

FIXME: pxref Additional
Information
, for a description of the `--verbose' (`-v') option.

If the blocking factor of the archive differs from the default, tar reports this.

FIXME: xref Blocking Factor
.

FIXME: xref Archive Reading Options
for a list of options which can be used to modify `--list' (`-t')'s operation.

This example prints a list of the archive members of the archive `stooges':

tar --list --file=stooges

tar responds:

larry
moe
shemp
marx/julius
marx/alexander
marx/karl

This example generates a verbose list of the archive members of the archive file `dwarves', which has a blocking factor of two:

tar --list -v --file=blocks

tar responds:

tar: Blocksize = 2 records
-rw------- ringo/user 42 May   1 13:29 1990 .bashful
-rw-rw-rw- ringo/user 42 Oct   4 13:29 1990 doc
-rw-rw-rw- ringo/user 42 Jul  20 18:01 1969 dopey
-rw-rw---- ringo/user 42 Nov  26 13:42 1963 grumpy
-rw-rw-rw- ringo/user 42 May   5 13:29 1990 happy
-rw-rw-rw- ringo/user 42 May   1 12:00 1868 sleepy
-rw-rw-rw- ringo/user 42 Jul   4 17:29 1776 sneezy

Go to the previous, next section.