Il Diario di Tinton

{2009-11-15}   Splitting Files into multiple archives

Splitting files / Multiple archives

If you would like to create a multiple archive zip, tar or whatever, the easiest thing is to use split. Split any file into whatever size you wish like this:

split -b <number_of_megs>m <file_to_split>

which will create a sequence of files named <file_to_split>{aa,ab,ac,…}. You can add to pipes, define output filename, and more. See man page.

Rebuilding the split archive

To rebuild, use cat:

cat <file_to_split>?? > <file_to_split>

or feed the pipe directly to unzip or tar.



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

et cetera
%d bloggers like this: