LinuxQuestions.org
Review your favorite Linux distribution.
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 05-25-2012, 08:14 PM   #1
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 346

Rep: Reputation: 38
Splitting/Merging Large Files


I got knee deep in creating a Clonezilla image when it occurred to me that CloneZilla is not capable of creating split images (to fit on DVD +R DL discs). So I ended up cloning the 40GB disk image to a USB disk.

I need that 40GB of space back by getting this thing onto DVDs for permanent storage. Someone suggested using split/cat to create 8GB parts of the image and then burning each to DVD but this seems a little dangerous.

I mean the copy [file] > [file] command in Windows is ridiculously prone to corruption. On Windows I used to use a program called QuickPar that would split large files and create recovery pars that could be used to recover from data corruption.

Can someone recommend a safe, effective, and highly reliable way on Linux to split this image file into DVD +R DL (8GB) sized chunks (and obviously merge them back when the time comes to restore the system --which I intend on doing once a year or so).
 
Old 05-25-2012, 08:54 PM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
Code:
split -b 8G input_file output_file_prefix
That will reliably divide the file into smaller chunks for you.

Code:
cat output_file_prefixaa > restored_full_file
cat output_file_prefixab >> restored_full_file
cat output_file_prefixac >> restored_full_file

(etc)
That will reliably restore the original file.

Test it out. It works.

It's not the Windows 'copy' command ... It's split and cat.
Nerds have been chunking out big ol' tar files and putting them back together with them for decades; they're good to go.

Note the use of '>>' for everything after the first chunk. That's important, because it specifies that the stream is appended to the end of the restored file. The '>' will just overwrite what's already there, and that's not what you want.

Last edited by foodown; 05-25-2012 at 08:58 PM.
 
1 members found this post helpful.
Old 05-26-2012, 08:32 AM   #3
gnunandakumar
LQ Newbie
 
Registered: May 2012
Location: Kerala, India
Distribution: Ubuntu, gNewSense
Posts: 5

Rep: Reputation: Disabled
Hope a GUI Application for this purpose from me.
 
Old 05-26-2012, 03:40 PM   #4
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 346

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by foodown View Post
Code:
split -b 8G input_file output_file_prefix
That will reliably divide the file into smaller chunks for you.

Code:
cat output_file_prefixaa > restored_full_file
cat output_file_prefixab >> restored_full_file
cat output_file_prefixac >> restored_full_file

(etc)
That will reliably restore the original file.

Test it out. It works.

It's not the Windows 'copy' command ... It's split and cat.
Nerds have been chunking out big ol' tar files and putting them back together with them for decades; they're good to go.

Note the use of '>>' for everything after the first chunk. That's important, because it specifies that the stream is appended to the end of the restored file. The '>' will just overwrite what's already there, and that's not what you want.
Thanks! I'll give it a shot then.
 
  


Reply

Tags
clonezilla, image, merge, par, split


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
Splitting and Merging files using dd Disillusionist LinuxAnswers Discussion 2 03-07-2014 10:00 AM
Splitting a parent process into 2 child and then merging result. chandan_maheshwari16 Programming 6 09-16-2010 04:02 AM
splitting large files to smaller parts ZaphyR Linux - Software 2 01-28-2005 01:15 PM
Help! Splitting 1 large partition into 3! sh1ft Linux - Hardware 2 06-30-2004 10:04 AM
Splitting then Merging Pres Linux - General 2 03-01-2004 10:03 AM


All times are GMT -5. The time now is 08:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration