splitting dmg files

Joined
Jan 20, 2009
Messages
36
Reaction score
0
Points
6
can someone slowly and carefully explain to me how to split a dmg file on terminal or a program to do it automatically please?
 
Joined
Aug 3, 2009
Messages
1,562
Reaction score
39
Points
48
Location
The Netherlands
There is a very easy way using the terminal.
The command that splits up a file is called "split".
It works for ANY big file, not just DMG files.
It has been around in the unix world for a long time.
Here is how it works.
You have a big file that you want to cut into smaller pieces.
Suppose its name BIG_STUFF".  
Suppose its size is 126 MegaBytes
Suppose you want the size of each piece to be at most 45 Megabytes

You type enter the terminal and change directory so that you
are in the directory where "mystuff.dmg" is.  You type his command

    split -b 45m BIG_STUFF

These files are created:
    xaa  
    xab  
    xac
The sizes of these files will be 45, 45, and 36 MegaBytes, respectively.
There is a limit to the number of output files obtained this way, because
the naming convention goes from xaa to zzz and that gives you
26 times 26 times 3 different file names, and that is the best
you can do with "split".

To put the pieces back together, you could type
    cat xaa xab xac > NEW_BIG_STUFF
The new two version files  BIG_STUFF and NEW_BIG_STUFF will be identical.

Going beyond the above example, if you have more than
three pieces to glue together, the cat command can do
that this way:

If you have fewer than 26 pieces:
    cat xa? > NEW_BIG_STUFF
If you have fewer than 676 pieces:
    cat x?? > NEW_BIG_STUFF
If you have more:
    cat x?? y?? z?? > NEW_BIG_STUFF

There is more to know about the cat command.
You can see it by typing "cat man" on the terminal.

Hope this helps;)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top