LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 12-06-2007, 03:54 PM   #1
300zxkyle
LQ Newbie
 
Registered: Jun 2007
Distribution: OpenSuSE 10.2
Posts: 13
Thanked: 0
Question tar + split question


[Log in to get rid of this advertisement]
In a previous thread I asked how to create a tar archive that would allow me to limit the file size and break up automatically into incremental archives.

http://www.linuxquestions.org/questi...volume-603509/

I decided to use the split option as it is meant for this and the -M flag for tar really isn't.

Code:
tar -cvpj 'directory/name'/ | split -d -b 4000m - /name/of/archive.tar.bz2.
which produces something like...

Code:
archive.tar.bz2.00
archive.tar.bz2.01
archive.tar.bz2.02
My question is this. How with the existing file size limit can I extract the contents of one of these archives back to the file system. I can't reassemble the files onto the file system because they will break the 4GB limit. Is there a way that I can pipe cat through tar? Are their other alternatives still?

Any help is appreciated.
300zxkyle is offline     Reply With Quote
Old 12-06-2007, 04:15 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 1,988
Thanked: 27
I don't think that's possible. Once you use split you have to join the files back together with cat before you can do anything else.
The real solution is to stop taring up your files to a FAT32 filesystem with its 4GB single file size limit. You shouldn't have this problem on any native linux filesystem.
kilgoretrout is offline     Reply With Quote
Old 12-06-2007, 04:39 PM   #3
David1357
Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 934
Blog Entries: 1
Thanked: 27
Quote:
Originally Posted by 300zxkyle View Post
My question is this. How with the existing file size limit can I extract the contents of one of these archives back to the file system. I can't reassemble the files onto the file system because they will break the 4GB limit. Is there a way that I can pipe cat through tar? Are their other alternatives still?
Try

# cat *.bz2* | (cd path-to-destination; tar jxv)
That should send a byte-stream through stdin to tar in the destination directory of your choice.
David1357 is offline     Reply With Quote
Old 12-06-2007, 04:48 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,495
Thanked: 6
dar allows you to split archive files and retrieve files from the archive without having to assemble them into one huge archive file. It will even pause while you eject media and mount the next disk in a series.

Dar is a good replacement for tar if you are making archives for storing on removable media, although I think it's not suitable for tape backups (which is tar's job).
matthewg42 is offline  
Tag This Post , ,
Reply With Quote
Old 12-07-2007, 08:52 AM   #5
300zxkyle
LQ Newbie
 
Registered: Jun 2007
Distribution: OpenSuSE 10.2
Posts: 13
Thanked: 0

Original Poster
Thumbs up worked like a charm.

David,

The solution you provided worked like a charm. Thanks everyone for the input.
300zxkyle is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
tar, split, burn to dvd result to tar file corruption fedusr Fedora 8 11-30-2007 05:39 PM
split or tar -M -L? Slacker0815 Linux - Software 3 06-05-2006 05:23 PM
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 4 04-04-2006 02:46 PM
tar problems, trying to pipe through split microsoft/linux Linux - Software 13 03-04-2006 09:20 PM
is it possible to get information from one bad split tar? eantoranz Linux - Software 1 03-30-2005 03:02 PM


All times are GMT -5. The time now is 08:33 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration