Previous: extracting untrusted archives, Up: extract


2.8.5 Commands That Will Fail

Here are some sample commands you might try which will not work, and why they won't work.

If you try to use this command,

     $ tar -xvf music.tar folk jazz

you will get the following response:

     tar: folk: Not found in archive
     tar: jazz: Not found in archive
     $

This is because these files were not originally in the parent directory .., where the archive is located; they were in the practice directory, and their file names reflect this:

     $ tar -tvf music.tar
     practice/folk
     practice/jazz
     practice/rock

Likewise, if you try to use this command,

     $ tar -tvf music.tar folk jazz

you would get a similar response. Members with those names are not in the archive. You must use the correct member names, or wildcards, in order to extract the files from the archive.

If you have forgotten the correct names of the files in the archive, use tar --list --verbose to list them correctly.