Operating System - Linux
1828354 Members
2939 Online
109976 Solutions
New Discussion

add another file to tarred bzip2 file

 
SOLVED
Go to solution
Ratzie
Super Advisor

add another 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?
3 REPLIES 3
Paul Cross_1
Respected Contributor
Solution

Re: add another file to tarred bzip2 file

bunzip the file, tar -r or tar -A to append the new file to the archive then re bzip the file.
Paul Cross_1
Respected Contributor

Re: add another file to tarred bzip2 file

example:
# bunzip2 archive.tar.bz2
# tar rf archive.tar newfile
# bzip2 archive.tar
K.C. Chan
Trusted Contributor

Re: add another file to tarred bzip2 file

you can do this in one step with tar rjf file.
Reputation of a thousand years can be determined by the conduct of an hour