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.

Leave a Reply