(tar)Extracting Specific Files ter


Next: Extracting Directories ter Prev: Extracting Files from an Archive ter Up: How to Extract Members from an Archive

Extracting Specific Files
-------------------------

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

   To extract specific files, specify them using file name arguments.

   In an example above, you created the archive file
`~/practice/records', which contained the files `blues', `folk' and
`jazz' in the `practice' directory.  If, for some reason, you were to
lose one of those text files (`rm ~/practice/blues'), you could extract
it from the archive file.

   First, change into the `practice' directory.  Then,

   * Invoke `tar' and specify the `--extract' (`-x') or `--get'
     operation.

   * Specify the archive that the files will be extracted
     from--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').

   * Specify the files to extract, using file name arguments (if you
     don't specify any files, `tar' extracts all the archive members)

     % tar --extract --file=records blues

   If you list the contents of the directory, you will see that `blues'
is back:

     % ls
     folk
     jazz
     records
     blues


automatically generated by info2www version 1.2