Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-11-2006, 12:50 AM
|
#1
|
Member
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216
Rep:
|
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.
|
|
|
07-11-2006, 01:57 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,199
|
How about using tar and split:
Code:
tar cvf file.tar /dir/to/tar
split -b 100000000 file.tar split-file.
This will create split-file.aa, split-file.ab etc and you can recreate the original tar file with cat:
Code:
cat split-file.aa split-file.ab ... > file.tar
You can also use the linux version of rar if you are familiar with it.
Regards
|
|
|
07-11-2006, 02:19 AM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
07-11-2006, 02:52 PM
|
#4
|
Member
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216
Original Poster
Rep:
|
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.
Last edited by Moebius; 07-11-2006 at 02:53 PM.
|
|
|
All times are GMT -5. The time now is 10:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|