Solved Removing files from tar archive

Is there a way of removing a group of files, e.g. a directory from a tar archive in FreeBSD? Disk not tape.

tar xvf tarfile.tar --exclude pattern_in_dropfile_name
tar xvf tarfile.tar --exclude unwanted/dropfile

does not seem to work
 
You need to use "="
Code:
$ mkdir bla
$ touch bla/bla1 bla/bla2
$ tar cvzf bla.tar.gz bla/
a bla
a bla/bla1
a bla/bla2
$ tar zxvf bla.tar.gz --exclude=bla1
x bla/
x bla/bla2
 
Solved

Much appreciated, apparently omitted in the man pages.

This will work for now, anyway I was looking for something that would permanently delete them from the archives, the reverse of the -r or -u options

Thanks again
 
I don't think you can 'edit' an archive in place, just add/overwrite files.
 
Back
Top