We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Split a .tar.gz file


NeddySeagoon
08-10-2013, 19:51
Shought,

If you can make the 80G file yourself, you can tell tar the tape length option.
You will get a number of files of the specified lenght that tar can reassemble.

man tar says
Code:
       -L, --tape-length N
              change tapes after writing N*1024 bytes
Putting the files back together with cat will take forever, as cat is character orientated, not block orientated.

Since you have the file, you can untar it somewhere, than tar it back up in pieces.
--- edit ---

You don't even need to have the space to untar it to as you can pipe the output of untar into another instance of tar with the --tape-lenght option, which tars it back up.

Shought
08-10-2013, 14:34
Found a issue. I am trying to split a 80GB file into 1.6GB files each however it keeps freezing? Any ideas?

Mark1978
08-10-2013, 12:57
And use cat to put it back together again.

Shought
08-10-2013, 11:57
Don't worry I have done this myself using the command
split -b 1024m file.tar.gz
(Filesize) (Filename)

Shought
08-10-2013, 11:48
Hi there,

I am looking to split a .tar.gz file into 1GB files..

What is the command to do this on CentOS?

Thanks,