LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-01-2004, 03:34 PM   #1
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Rep: Reputation: 15
join multiple files


I have a backup here that I need to join together, but I'm not exactly sure how the process works (sorry if this should be in newbies).

There are 4 files called:
trader-xxxx.bz2
trader-xxxx.bz2.aa
trader-xxxx.bz2.ab
trader-xxxx.bz2.ac

How would I join them to create the original bz2 file? Any help is appreciated!
 
Old 06-01-2004, 03:46 PM   #2
Gecko
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Gentoo
Posts: 47

Rep: Reputation: 16
I use tar and gzip, personally. However, the methodology is similar.

Put them all in a directory, and tar them like this:

tar cvf files.tar your_directory_name

That will tar them all, then you can compress the single tar instance with bz
 
Old 06-01-2004, 03:51 PM   #3
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Gecko
I use tar and gzip, personally. However, the methodology is similar.

Put them all in a directory, and tar them like this:

tar cvf files.tar your_directory_name

That will tar them all, then you can compress the single tar instance with bz
Well it used to be a single file "trader-xxx.bz2" but someone made a script to split it up into two different ISO files. The two DVDs have those four files, so I want to join them together to make the original trader-xxx.bz2 file.

Would cat work? I guess this really does belong in newbie
 
Old 06-01-2004, 04:05 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Cat should work:
cat trader-xxxx.bz2 > trader-xxxx-full.bz2
cat trader-xxxx.bz2.aa >> trader-xxxx-full.bz2
cat trader-xxxx.bz2.ab >> trader-xxxx-full.bz2
cat trader-xxxx.bz2.ac >> trader-xxxx-full.bz2
 
Old 06-01-2004, 04:06 PM   #5
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
Cat should work:
cat trader-xxxx.bz2 > trader-xxxx-full.bz2
cat trader-xxxx.bz2.aa >> trader-xxxx-full.bz2
cat trader-xxxx.bz2.ab >> trader-xxxx-full.bz2
cat trader-xxxx.bz2.ac >> trader-xxxx-full.bz2
I used all but the first line, should it still work?

I'm running bunzip2 right now and it seems to be extracting...
 
Old 06-01-2004, 04:07 PM   #6
Gecko
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Gentoo
Posts: 47

Rep: Reputation: 16
Quote:
Originally posted by david_ross
Cat should work:
cat trader-xxxx.bz2 > trader-xxxx-full.bz2
cat trader-xxxx.bz2.aa >> trader-xxxx-full.bz2
cat trader-xxxx.bz2.ab >> trader-xxxx-full.bz2
cat trader-xxxx.bz2.ac >> trader-xxxx-full.bz2
Oops, sorry thought you just wanted a compressed single file.

Cat like David said should work great.
 
Old 06-01-2004, 04:15 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Quote:
Originally posted by onewhoknows
I used all but the first line, should it still work?

I'm running bunzip2 right now and it seems to be extracting...
I created a seperate file using "full" in the file name but if you cated to the end of file one then it will be fine.
 
Old 06-01-2004, 04:17 PM   #8
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
I created a seperate file using "full" in the file name but if you cated to the end of file one then it will be fine.
Ah, I didn't even notice that - thanks!

Affero...
 
Old 06-01-2004, 04:30 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Quote:
Originally posted by onewhoknows
Ah, I didn't even notice that - thanks!
It will not matter - it was just to keep the originals untouched.

Quote:
Originally posted by onewhoknows
Affero...
Thanks
 
Old 06-01-2004, 05:00 PM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You can simplify the command by just typing "cat trader-xxxx.bz2.* > trader-xxxx.bz2"
 
Old 06-01-2004, 06:51 PM   #11
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Electro
You can simplify the command by just typing "cat trader-xxxx.bz2.* > trader-xxxx.bz2"
I'll try to remember that!
 
  


Reply



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
Help using 'net join' to join a windows domain Wapo Linux - Networking 1 04-28-2006 02:30 AM
How to join two tar files ? skie_knite007 Programming 8 03-28-2005 11:41 AM
Any software out there for linux to join movie files? theMonkeY Linux - Software 1 11-07-2004 10:06 AM
join realvideo files? wijnands Linux - Newbie 1 06-28-2004 05:20 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:22 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
Open Source Consulting | Domain Registration