bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Split Big File Using "tar"


From: Rolando Sacramento
Subject: Re: [Bug-tar] Split Big File Using "tar"
Date: Mon, 30 Jan 2006 15:36:49 +0800

hi,
 
Is this 80G file is only 1 file?
 
if not you can specify a specific limit to create a Tar File.
e.g.
 
ulong TotalFileSize = 0;
int Limit =  1000; //KB
foreach(Fileinfo oFile in Directory.GetFiles()){
    TotalFileSize  += oFile.Length;
    if (TotalFileSize < Limit){
        TarEntry oTarEntry  = TarEntry.CreateEntryFromFile(oFile.FullName);
        archive.WriteEntry(oTar, true);
    }
    else{
        archive.Close();
    }
}
 
then loop again.
 
 
if this is 80G file is only
You do a similar process above but instead of reading and adding per file, you must open a stream and read from the streams. after a condition that satisfy the limit of your per archive close it. and create a new archive using the same stream.
 
 
 
Rolly
address@hidden
----- Original Message -----
Sent: Monday, January 30, 2006 3:16 PM
Subject: [Bug-tar] Split Big File Using "tar"

Hai All,

Is it Possible to Create archive of spacific size.. (as like we can do with winrar)

i am having a 80 GB file.. while tar is.. is it possible to split as 80Archive of 1 GB...
eg  file name is    "image"

while tar it.. i wish to split it as..

image0001.tar    
image0002.tar
image0003.tar...........................
................................................
image0079.tar
image0080.tar



if there is any way for that.. please help me...

Thank You in advance,

Jerrynikky.


_______________________________________________
Bug-tar mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-tar

reply via email to

[Prev in Thread] Current Thread [Next in Thread]