is there a linux-supported archive format that can split into multiple files?
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
is there a linux-supported archive format that can split into multiple files?
On windows if I have a big file or a bunch of really small files and I want to compress them and put them in an archive for transportation, but I only want each file that is a part of the archive to be say 100MB to make it more manageable. Rar and ace can do this on windows, but it doesn't seem like one can CREATE rar or ace archives on linux - only read them. I know about tar for putting files in a big archive and compressing it using either bzip or gzip, but it can't split the archive.
You can also pipe the output of the tar command to the split command. That way you don't need to save a large file before splitting it. Suppose that you are archiving your home directory to a usb external drive. The vfat filesystem has a limit of 2GB so you can't save the entire archive, and you don't have room on your Linux system to save a large tarball before splitting it.
tar -czvf - *.rpm | ( cd ~/media/usbdrive/ ; split -b100m -d - homebu.tar.gz.)
This will create a number of files: homebu.tar.gz.00, hombu.tar.gz.01, etc.
Now you might want to use par2 to create parity files, in case one of the files gets damaged or deleted.
You can retrieve files from your split tarball by cat'ing them together and piping that through tar.
cat ~/media/usbdrive/homebu.tar.gz.* | tar -C destdir -xvzf -
Again, suppose that your backup would have taken up 40GB. You never had to have a file of such an unmanagable size.
If you want to backup to CD or DVD, I would recommend that you look at the dar and kdar programs.
hmmm thats an aweful lot of work for a simple task and the files can't be read in windows. Using winRAR I can just check the box that I want it split into multiple volumes and when extracting it automatically knows that it is a multi-volume archive and I don't have to do anything.
Another example of how almost anything is possible with Linux but its such a pain that its almost not worth it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.