Skip to content

Instantly share code, notes, and snippets.

@sosukeinu
Created January 29, 2013 17:27
Show Gist options
  • Save sosukeinu/4665975 to your computer and use it in GitHub Desktop.
Save sosukeinu/4665975 to your computer and use it in GitHub Desktop.
BASH split and join files
##To split files into even-sized, smaller chunks, and combine them back into a single file
##To Split
split -b 100m 'somefile.ext' somefile.
##-b tells the split command that you want to specify the 'byte' size 100m, or 100 megabytes is the size of the parts we wanted 'somefile.ext' is the file we want to split into parts somefile. tells the split command that all part files should begin with 'some file.'
##To Join
cat somefile.?? > 'somefile.ext'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment