Madhav Kobal's Blog

This blog will be dedicated to Linux, Open Source and Technology news, affairs, how-tos and virtually EVERYTHING in these domains.

Split and Join Large Files

Posted by madhavkobal on 20/08/2009

Just use the default GNU tools tar, split and cat. There is absolutely no need for any fancy gui tools or software that you have to run in Wine!

Just type the following in a console window:

tar cvzf – filename.iso | split -d -b 700m – filename.iso.tar.gz.

This wil produce the following files:
filename.iso.tar.gz.1
filename.iso.tar.gz.2
filename.iso.tar.gz.3

Burn to CD with your favorite burner, one file per disk.

Then later if you want to restore the iso, first copy all the parts in one directory, and then type

cat filename.iso.tar.gz.* | tar xvzf –

That will give you back your original ISO.

I needed this a few days ago for a >10G backup that I wanted to put on a FAT32 external drive (maximum file size: 2G). Worked like a charm!

If you are concerned with space, replace the ‘z’ option in tar with ‘j’, and replace ‘gz’ in the filenames with ‘bz2’. Bz2 compression is usually a bit better than gz compression, but it’s slower.

And if you really want to save disk space, install the console version of 7-Zip, create a .7z archive, and pipe this trough split.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: