labs. bfloch.com/script/Shell file splitting
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

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

Comments:

No Comments for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))