[vox-tech] tar question

Shawn P. Neugebauer vox-tech@lists.lugod.org
Tue, 4 Jun 2002 12:09:07 -0700


On Tuesday 04 June 2002 11:56 am, you wrote:
> I think what you need is tar --delete --file test.tar b
>
> (i.e. put the list of files to delete at the end of the command line)

yes.  alternately,
  tar f test.tar --delete "b"

fyi: i often use "tar cvf tarfile.tar ./somedirectory" to create, verbosely,
a tar file containing all the stuff in somedirectory, rather than using
redirection to create the file.  add a "z" (i.e., cvfz) to compress it.

note:  "b" must *exactly* match the file you wish to remove.  this
can often cause problems and confusion.  for example, if i create
a tar file with:
  tar cvf tarfile.tar ./somedirectory
then if i want to remove the file somedirectory/b from the archive,
i must use: 
  tar f tarfile.tar --delete "./somedirectory/b"
in other words, whatever tar displays (e.g., "./b") is what you must
specify.

shawn.