labs. bfloch.com/script/batch
private.  
/script /output
/links
/about



 »    
09/Jul/06
batch

 
» Shell file splitting

I always keep forgetting shell commands I rarely use. I needed to split a file on a mac and put it together on a pc. (good old 4GB Fat32 limit)

split --verbose -d -b4000MB input.mov output.mov.part

-b2000M sets the maximum size to 4000 Megabytes (b for binary). -d uses numeric suffix instead of aa ab etc.

SIZE may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000,
M 1024*1024, GB 1000*1000*1000,
G 1024*1024*1024, and so on for T, P, E, Z, Y.

On a PC you can use the commandline command:

copy output.mov.part00+output.mov.part01 output_complete.mov

On a unix shell use:

cat output.mov.part00 output.mov.part01 > output_complete.mov

..................................................