Skip to content

Instantly share code, notes, and snippets.

@NapoleonWils0n
Created November 11, 2012 01:12
Show Gist options
  • Save NapoleonWils0n/4053253 to your computer and use it in GitHub Desktop.
Save NapoleonWils0n/4053253 to your computer and use it in GitHub Desktop.
bash: split and cat files
#!/bin/sh
# split files into chunk and rejoin with cat
# zip the file up first then split it, then rejoin it as a zip with cat
# that way when you unzip the file it keeps the original file name
# split -b (filesize in mb)80m file.avi splitprefix_
split -b 80m somefile.zip file_
# rejoin files with cat
cat file_* > file.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment