(tar)List A Specific File in an Archive bis


Next: Listing the Contents of a Stored Directory ter Prev: Getting Additional File Information bis Up: How to List Archives

List A Specific File in an Archive
----------------------------------

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

FIXME:
   To to see if a particular file is in an archive, specify the name of
the file in question as a file name argument while specifying the
`--list' (`-t') operation.  For example, if you wanted to see if the
file `folk' were in the archive file `music', you would:

   * Invoke `tar', and specify the operation to list the contents of an
     archive--`--list' (`-t').

   * Specify the name of the archive file to be acted
     on--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').

   * Specify the name of the file `tar' is to look for, as a file name
     argument.  Because `tar' preserves paths, file names must be
     specified as they appear in the archive (ie.. as they are relative
     to the directory from which the archive was created).
     FIXME: xref -P

   Type:

     % tar --list --file=music practice/folk

`tar' responds:

     practice/folk

If the file were not in the archive (for example, the file
`practice/rock'), the example above would look like:

     % tar --list --file=music practice/rock
     tar: practice/rock not found in archive

   The `--verbose' (`-v') option does not have any effect on execution
of the `--list' (`-t') operation when you have specified file name
arguments.
FIXME: this is a bug (?)

   To to see if a particular file is in an archive, use the name of the
file in question as a file name argument while specifying the `--list'
(`-t') operation.  For example, to see whether the file `folk' is in the
archive file `music', do the following:

   * Invoke `tar', and specify the `--list' (`-t') operation.

   * Specify the archive file to be acted on--`--file=ARCHIVE-NAME'
     (`-f ARCHIVE-NAME').

   * Specify the files to look for, by typing their names as file name
     arguments.  You have to type the file name as it appears in the
     archive (normally, as it is relative to the relative to the
     directory from which the archive was created).
     FIXME: xref absolute-names

   Type:

     % tar --list --file=music practice/folk

   `tar' responds:

     practice/folk

   If the file were not stored in the archive (for example, the file
`practice/rock'), the example above would look like:

     % tar --list --file=music practice/rock
     tar: practice/rock not found in archive

   If you had used `--verbose' (`-v') mode, the example above would
look like:

     % tar --list --file=music practice/folk
     -rw-rw-rw- myself/user 62 May 23 10:55 1990 practice/folk


automatically generated by info2www version 1.2