LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2009, 02:03 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
Merge tar files


I have two tar zipped file ( .tgz ) made by tar -zcvf , they are text file before compress , can advise how can I merge these two files into one ? thx
 
Old 05-08-2009, 07:04 AM   #2
jens1245
LQ Newbie
 
Registered: May 2009
Posts: 18

Rep: Reputation: 5
Try this:

http://support-ph.linuxfiesta.com/?q=node/36
 
Old 05-08-2009, 07:15 AM   #3
dracofhc
Member
 
Registered: Dec 2005
Location: Kalamazoo, MI, US
Distribution: Gentoo
Posts: 44

Rep: Reputation: 16
RTFM, please. It's the -A option.
 
Old 05-08-2009, 07:21 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
From tar man page:

Code:
-A, --catenate, --concatenate
              append tar files to an archive
 
Old 05-08-2009, 07:26 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Code:
$ gzip -d archive1.tgz
$ gzip -d archive2.tgz
$ tar --concatenate --file=archive2.tar archive1.tar
 
1 members found this post helpful.
Old 04-15-2011, 10:37 AM   #6
fabyouless
LQ Newbie
 
Registered: May 2008
Location: Vallejo, CA, USA
Distribution: ubuntu oneiric
Posts: 4

Rep: Reputation: 1
howto merge 2 tar files

Thank you for your response, dracofhc. In all fairness, the question was how to "merge" tar files, and the fine manual makes no use of the word "merge". In my case, it's a case of not thinking in the correct terms. But thanks to your direction, i now have the correct solution.
Thank you linuxlover.chaitanya and colucix for going steps further to identify proper usage.
BTW, this post was at the top of my google search.
 
Old 06-20-2011, 05:02 PM   #7
dracofhc
Member
 
Registered: Dec 2005
Location: Kalamazoo, MI, US
Distribution: Gentoo
Posts: 44

Rep: Reputation: 16
Must have been having a stressful day =P Glad you found this post helpful.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compare two files and merge nelex Programming 5 02-25-2009 08:45 AM
merge files, given its odd and even given timepassman Linux - Software 1 05-08-2008 01:17 AM
Merge Two Kernel config files kushalkoolwal Linux - Kernel 3 07-25-2007 11:49 PM
merge wav files linuxhippy Slackware 6 06-01-2007 11:30 AM
program to split and merge files fuelinux Linux - Software 3 10-25-2003 11:56 AM


All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration