LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about the .tar.gz file (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-the-tar-gz-file-512552/)

zwylinux 12-21-2006 07:17 AM

A question about the .tar.gz file
 
In the current directory,there are two files:
a.tar.gz b.txt
Now I want to directly add b.txt to a.tar.gz
How can I do that?

Note that you can't release the a.tat.gz then create a new a.tar.gz file.

Nylex 12-21-2006 07:20 AM

Use tar's --append option.

zwylinux 12-21-2006 07:50 AM

But a.tar.gz is a gz file.I don't think any tar options is suitable

pixellany 12-21-2006 08:01 AM

.gz means the file was compressed by GZIP
.tar means that N files were archived into one file by TAR
TAR includes commands to do the GZIP (and GUNZIP) all in one command

To do your thing, first use gunzip, which will give you a .tar file. Then you can do the append option suggested by Nylex.

sheryco 12-21-2006 08:42 AM

See for more information on tar --append
http://www.gnu.org/software/tar/manu...nd.html#append
that is if you haven't read it.


All times are GMT -5. The time now is 09:22 AM.