How to compress and split into smaller files in Linux

I want to back up a folder that has a size of more than 6GB and then put it into the CD-ROM. To do this, I compress the folder
zip -r /mnt/ESA/Oka/Old.zip Old/

and then split into smaller size using zipsplit. To check how many files will be created if we want to split into 600MB, type
zipsplit -tn 629145600 /mnt/ESA/Oka/Old.zip

and to split the file, type
zipsplit -n 629145600 /mnt/ESA/Oka/Old.zip

UPDATED
Uh it seems that there is a file size limit with zip. It stops at around 13MB.

so use tar and split instead. Type
tar czvf /mnt/ESA/Oka/Old.tar.gz Old/
to create the archive file, and then
split –-bytes=600m /mnt/ESA/Oka/Old.tar.gz /mnt/ESA/Oka/mysplitfiles/Old.tar.gz.
to split the files and put into mysplitfiles directory. The files will be Old.tar.gz.aa, Old.tar.gz.ab and so on.

To recover them type
cat Old.tar.gz.* > Old.tar.gz

check this link.

Advertisements

One Response

  1. […] http://www.linuxquestions.org/questi…-files-347840/ https://techlogbook.wordpress.com/200…iles-in-linux/ or you will need to write a small script to compress files after splitting (on the fly). That would […]

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: