Sunday, December 27, 2009

Split large files on Mac OS

As I wrote before I publish tips here based on my experience and tasks I have in real life. Recently I had a problem to write large file (~8Gb) onto small (~7Gb) flash stick ;) So I had to split the file onto two parts and join it later. As a console UNIX geek I chose the UNIX way on my Mac OS system.
The `split' command will help with it. If you need split the file do in console:
$ split -b 7168m filename.dmg filename.dmg.
-b is a new parts size in Megabytes (7168m=7Gb)
Have a note on last point letter. It is just to remember the extensions after file transfer. The extensions for parts will be: filename.dmg.aa filename.dmg.ab ...
When you plan to join files back do in console:
$ cat filename.dmg.* > filename.dmg
This method is more effective and faster compare to create the segmented dmg files

No comments: