LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 07-11-2006, 12:50 AM   #1
Moebius
Member
 
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216

Rep: Reputation: 30
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.
 
Old 07-11-2006, 01:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,199
Blog Entries: 1

Rep: Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058
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
 
Old 07-11-2006, 02:19 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 07-11-2006, 02:52 PM   #4
Moebius
Member
 
Registered: Dec 2002
Location: Milwaukee, WI
Distribution: Ubuntu, Kubuntu, Debian, CentOS
Posts: 216

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
split file archive hiptrop General 1 10-26-2005 12:28 AM
A linux program that can handle split .rar files? Cinematography Linux - Software 3 05-03-2005 03:04 PM
divide a directory into multiple archive files with par ddaas Linux - General 1 02-26-2005 01:52 PM
multiple volume archive lil_becky Linux - Newbie 2 01-19-2005 05:26 PM
Renaming multiple files with the same format Shr00mBoXx Slackware 7 06-20-2004 07:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration