Operating System - HP-UX
1833491 Members
3049 Online
110052 Solutions
New Discussion

add addnl file to tarred bzip2 file

 
Ratzie
Super Advisor

add addnl file to tarred bzip2 file

I have a tarred bzip2 file that I made with gnu tar
gtar -jcvf sometar.bz2 /somedir

How do I add additional files to the tarred bzip2 file?
2 REPLIES 2
Pete Randall
Outstanding Contributor

Re: add addnl file to tarred bzip2 file

From "man tar":


r - Add the named file to the end of the archive. The same
blocking factor used to create the archive must be used to
append to it. This option cannot be used if the archive is a
tape.


Pete

Pete
Donny Jekels
Respected Contributor

Re: add addnl file to tarred bzip2 file

you will need to unzip the zipped file.

then use tar -u to update the tar ball with an additional file and or files.

say your tar ball is sometar.tar and you want to add file1 and file 2

tar -uvf sometar.tar file1 file2

peace
Donny
"Vision, is the art of seeing the invisible"