(tar)How to List Archives
Next:
How to Extract Members from an Archive Prev:
How to Create Archives Up:
Tutorial
How to List Archives
====================
*(This message will disappear, once this node revised.)*
Use `--list' (`-t') to print the names of members stored in an
archive. Use a `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME') option just
as with `--create' (`-c') to specify the name of the archive. For
example, the archive `afiles.tar' created in the last section could be
examined with the command `tar --list --file=afiles.tar'. The output
of `tar' would then be:
apple
angst
asparagus
The archive `bfiles.tar' would list as follows:
./baloons
baboon
./bodacious
(Of course, `tar --list --file=empty-archive.tar' would produce no
output.)
If you use the `--verbose' (`-v') option with `--list' (`-t'), then
`tar' will print out a listing reminiscent of `ls -l', showing owner,
file size, and so forth.
You can also specify member names when using `--list' (`-t'). In
this case, `tar' will only list the names of members you identify. For
example, `tar --list --file=afiles.tar apple' would only print `apple'.
It is essential when specifying member names to `tar' that you give
the exact member names. For example, `tar --list --file=bfiles
baloons' would produce no output, because there is no member named
`baloons', only one named `./baloons'. While the file names `baloons'
and `./baloons' name the same file, member names are compared using a
simplistic name comparison, in which an exact match is necessary.
Listing files in an archive bis-
Getting Additional File Information bis-
List A Specific File in an Archive bis-
Listing the Contents of a Stored Directory ter-
automatically generated by info2www version 1.2