add files to compressed tar-archive
add files to compressed tar-archive
Does anyone know how to add files to an existing compressed tar-file?
Re: add files to compressed tar-archive
Short answer you can't:
You can however update/add files to normal tar-files.
So there are 2 options.
you can extract everything from the compressed tar-file
and then re-add everything, including the new file.
Or, and perhaps better.
first compress the file and then add to the tar-archive.
Code: Select all
tar: Cannot update compressed archives
Code: Select all
tar -uvf file.tar addfile.pdf
you can extract everything from the compressed tar-file
and then re-add everything, including the new file.
Or, and perhaps better.
first compress the file and then add to the tar-archive.
Code: Select all
gzip -c $FILE > $COMPRESSED.gz;
tar -uvf $NEWARCHIVE $COMPRESSED.gz;
Re: add files to compressed tar-archive
Not really what I was looking for,
but it works.
So thanks
but it works.
So thanks