Go to the previous, next section.

Listing the Contents of an Archive

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

You can list the contents of the archive you just created with another option of tar: `--list' (`-t'). To list the contents of an archive, type:

% tar --list --file=records

tar will respond:

blues folk jazz

FIXME: xref Listing Archive Contents
, for a more detailed tutorial of the `--list' (`-t') operation.
FIXME: xref Listing Contents
for more information about the `--list' (`-t') operation.
FIXME:

You can use `--list' (`-t') to output a list of the files in an archive. If you use file name arguments with this operation, tar will look in the archive for the files specified and display their names only if they are, in fact, stored. You can use `--list' (`-t') with the `--verbose' (`-v') option to find out the attributes (owner, size, etc.) of stored files.

You can list the contents of an archive with another operation of tar: `--list' (`-t'). To list the contents of the archive you just created, type:

% tar --list --file=records

tar will respond:

blues folk jazz

FIXME: xref Listing Archive Contents
, for a more detailed tutorial of the `--list' (`-t') operation.
FIXME: xref Listing Contents
, for more information about the `--list' (`-t') operation.

In a previous example, you created the archive `music' in the home directory. To list the contents of `music':

Thus:

% tar --list --file=music
practice/
practice/blues
practice/folk
practice/jazz
practice/records

Use `--list' (`-t') to print the names of files stored in an archive. If you use file name arguments with this operation, tar prints the names of the specified files if they are stored in the archive. If you use a directory name as a file name argument, tar also prints the names of all underlying files, including sub-directories. If you use no file name arguments, tar prints the names of all the archive members.

You can use `--list' (`-t') with the `--verbose' (`-v') option to print archive members' attributes (owner, size, etc.).

To list the names of files stored in an archive, use the `--list' (`-t') operation of tar.

In a previous example, you created the archive `~/music'. To list the contents of `music', while in your home directory:

Thus:

% tar --list --file=music
practice/
practice/blues
practice/folk
practice/jazz
practice/records

Go to the previous, next section.