13

I've got a 6 GB file, which needs to be copied to an USB-drive. The drive is 16 GB, but formatted in FAT so windows computers and Macs can read it. Fat limits the file size to 4 GB, so I cannot copy my file. My sollution would be to create a multi part archive, in two files of 3 GB.

How do I create a multi part archive on osx?

5 Answers 5

12

You can split any file with the split command:

split -b 2048m bigfile.tgz bigfile.tgz.

And you will get:

bigfile.tgz.aa
bigfile.tgz.ab
...

To combine them again:

cat bigfile.tgz.* > bigfile.tgz

It can also be used on Windows with copy /B

Of course, this is not really a multi-part archive, just cutting any file to pieces. Multi-part archives are usually aware that they are part nb 5 is a series, include CRC verification for each file etc. But that is specific to the archive format that you want to use.

1
  • Ok,this works. I was hoping for an archive file type the reciever can open in a GUI, like ZIP, RAR, etc.
    – Gerrit
    Aug 9, 2010 at 14:20
5

Use programs like

3

To split with the internal zip command on OS X, type this in a terminal:

zip -s 1g BigFile6GB.zip BigFile6GB.iso

Where 1g = split files in 1GB of maximum size.

The result will be 6 files of 1GB each.

Read man zip on terminal to see others options of split size with the internal zip command.

1
  • archives produced with this command can not be opened with standard GUI mac os zip utility
    – heximal
    Aug 25, 2020 at 13:11
0

There is a Mac-port of 7z archiver.

It can be used to make segmented archives.

0

Tar. Tar is a GNU-licensed tool capable of creating multi-volume archives. In Mac OS X you need to use the Terminal to access the command line.

On Mac OS X 10.4.11* it works as follows:

tar --tape-length=102400 -cMv --file=tar_archive.{tar,tar-{2..100}} [files to tar] 

102400 is size in KB or 100 MB. -c create, -M multi-volume and -v verbose. --file specifies the name of the tar archive to create, {tar,tar-{2..100}} is a bash expansion that provides the extensions .tar, .tar-2, .tar-3, etc. [files to tar] is the file or files to include in the archive.

Now, according to my source for this solution (http://hints.macworld.com/article.php?story=20090321124207437), the following is the extraction command, but, bash did not dutifully expand the braces for me so I had to develop a manual solution for combining the tar archives.

tar -xMv --file=tar_archive.{tar,tar-{2..100}} [files to extract] 

What worked for me was this:

tar -xMv --file=tar_archive.tar

Followed by the prompt:

Prepare volume #2 for `file_that_was_tarred' and hit return:

At this point, type:

n tar_archive.tar-2

Presumably this means `name of the next volume is tar-archive.tar-2'

Now you'll be prompted with:

Prepare volume #2 for `tar_archive.tar-2' and hit return: 

At this point press return.

You will need to repeat this process for each file in your multi-volume tar archive, remembering to change the suffix number each time.

Granted, there are much simpler ways now to accomplish this, but, I had to use Mac OS X 10.4.11 remotely using TeamViewer 7 (an amazing program that still runs and is allowed to access TeamViewer's servers on Mac OS X 10.4.11!!!). This was the least frustrating method of transferring a 2 GB disk image of a fresh install of Mac OS X 10.4.11 over the internet (if a 200 MB transfer fails that's 20 minutes, but, if a 2 GB transfer fails that's a day's worth of planning down the drain).

Source: http://hints.macworld.com/article.php?story=20090321124207437

*I'm providing tech support for my father who needs to use the Classic version of Word 5.0 which only runs in Mac OS X 10.4.11 (he has Alzheimer's which means he cannot learn new things and gets frustrated with new things). I live in a different city so the only way for me to help him is by remote control.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .